forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite41aed6
committed
pgstat: revise replication slot API in preparation for shared memory stats.
Previously the pgstat <-> replication slots API was done with on the basis ofnames. However, the upcoming move to storing stats in shared memory makes itmore convenient to use a integer as key.Change the replication slot functions to take the slot rather than the slotname, and expose ReplicationSlotIndex() to compute the index of an replicationslot. Special handling will be required for restarts, as the index is notstable across restarts. For now pgstat internally still uses names.Rename pgstat_report_replslot_{create,drop}() topgstat_{create,drop}_replslot() to match the functions for other kinds ofstats.Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Discussion:https://postgr.es/m/20220404041516.cctrvpadhuriawlq@alap3.anarazel.de1 parent8b1dccd commite41aed6
6 files changed
+41
-12
lines changedLines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
862 | 862 |
| |
863 | 863 |
| |
864 | 864 |
| |
865 |
| - | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
866 | 874 |
| |
867 | 875 |
| |
868 | 876 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1921 | 1921 |
| |
1922 | 1922 |
| |
1923 | 1923 |
| |
1924 |
| - | |
| 1924 | + | |
1925 | 1925 |
| |
1926 | 1926 |
| |
1927 | 1927 |
| |
|
Lines changed: 18 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
356 | 356 |
| |
357 | 357 |
| |
358 | 358 |
| |
359 |
| - | |
| 359 | + | |
360 | 360 |
| |
361 | 361 |
| |
362 | 362 |
| |
| |||
399 | 399 |
| |
400 | 400 |
| |
401 | 401 |
| |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
402 | 418 |
| |
403 | 419 |
| |
404 | 420 |
| |
| |||
746 | 762 |
| |
747 | 763 |
| |
748 | 764 |
| |
749 |
| - | |
| 765 | + | |
750 | 766 |
| |
751 | 767 |
| |
752 | 768 |
| |
|
Lines changed: 8 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
72 |
| - | |
| 72 | + | |
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 |
| |
97 | 100 |
| |
98 |
| - | |
| 101 | + | |
99 | 102 |
| |
100 | 103 |
| |
101 | 104 |
| |
102 | 105 |
| |
103 |
| - | |
| 106 | + | |
104 | 107 |
| |
105 | 108 |
| |
106 | 109 |
| |
| |||
110 | 113 |
| |
111 | 114 |
| |
112 | 115 |
| |
113 |
| - | |
| 116 | + | |
114 | 117 |
| |
115 | 118 |
| |
116 | 119 |
| |
117 | 120 |
| |
118 |
| - | |
| 121 | + | |
119 | 122 |
| |
120 | 123 |
| |
121 | 124 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1137 | 1137 |
| |
1138 | 1138 |
| |
1139 | 1139 |
| |
1140 |
| - | |
1141 |
| - | |
1142 |
| - | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1143 | 1144 |
| |
1144 | 1145 |
| |
1145 | 1146 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
| 219 | + | |
219 | 220 |
| |
220 | 221 |
| |
221 | 222 |
| |
|
0 commit comments
Comments
(0)