forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9fd0252
committed
Replace hardcoded identifiers of pgstats file by #defines
This changes pgstat.c so as the three types of entries that can exist ina pgstats file are not hardcoded anymore, replacing them withdescriptively-named macros, when reading and writing stats files:- 'N' for named entries, like replication slot stats.- 'S' for entries identified by a hash.- 'E' for the end-of-fileThis has come up while working on making this area of the code morepluggable. The format of the stats file is unchanged, hence there is noneed to bump PGSTAT_FILE_FORMAT_ID.Reviewed-by: Bertrand DrouvotDiscussion:https://postgr.es/m/Zmqm9j5EO0I4W8dx@paquier.xyz1 parentdd56921 commit9fd0252
1 file changed
+20
-8
lines changedLines changed: 20 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
130 | 138 |
| |
131 | 139 |
| |
132 | 140 |
| |
| |||
1431 | 1439 |
| |
1432 | 1440 |
| |
1433 | 1441 |
| |
1434 |
| - | |
| 1442 | + | |
1435 | 1443 |
| |
1436 | 1444 |
| |
1437 | 1445 |
| |
| |||
1441 | 1449 |
| |
1442 | 1450 |
| |
1443 | 1451 |
| |
1444 |
| - | |
| 1452 | + | |
1445 | 1453 |
| |
1446 | 1454 |
| |
1447 | 1455 |
| |
| |||
1458 | 1466 |
| |
1459 | 1467 |
| |
1460 | 1468 |
| |
1461 |
| - | |
| 1469 | + | |
1462 | 1470 |
| |
1463 | 1471 |
| |
1464 | 1472 |
| |
| |||
1569 | 1577 |
| |
1570 | 1578 |
| |
1571 | 1579 |
| |
1572 |
| - | |
1573 |
| - | |
| 1580 | + | |
| 1581 | + | |
1574 | 1582 |
| |
1575 | 1583 |
| |
1576 | 1584 |
| |
1577 | 1585 |
| |
1578 | 1586 |
| |
1579 | 1587 |
| |
1580 | 1588 |
| |
1581 |
| - | |
| 1589 | + | |
1582 | 1590 |
| |
1583 | 1591 |
| |
1584 | 1592 |
| |
| |||
1644 | 1652 |
| |
1645 | 1653 |
| |
1646 | 1654 |
| |
1647 |
| - | |
1648 |
| - | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
1649 | 1661 |
| |
1650 | 1662 |
| |
1651 | 1663 |
| |
|
0 commit comments
Comments
(0)