forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb14e9ce
committed
Extend PgStat_HashKey.objid from 4 to 8 bytes
This opens the possibility to define keys for more types of statisticskinds in PgStat_HashKey, the first case being 8-byte query IDs forstatistics like pg_stat_statements.This increases the size of PgStat_HashKey from 12 to 16 bytes, whilePgStatShared_HashEntry, entry stored in the dshash for pgstats, keepsthe same size due to alignment.xl_xact_stats_item, that tracks the stats items to drop in commit WALrecords, is increased from 12 to 16 bytes. Note that individual chunksin commit WAL records should be multiples of sizeof(int), hence 8-byteobject IDs are stored as two uint32, based on a suggestion from HeikkiLinnakangas.While on it, the field of PgStat_HashKey is renamed from "objoid" to"objid", as for some stats kinds this field does not refer to OIDs butjust IDs, like for replication slot stats.This commit bumps the following format variables:- PGSTAT_FILE_FORMAT_ID, as PgStat_HashKey is written to the stats filefor non-serialized stats kinds in the dshash table.- XLOG_PAGE_MAGIC for the changes in xl_xact_stats_item.- Catalog version, for the SQL function pg_stat_have_stats().Reviewed-by: Bertrand DrouvotDiscussion:https://postgr.es/m/ZsvTS9EW79Up8I62@paquier.xyz1 parentac04aa8 commitb14e9ce
File tree
17 files changed
+98
-75
lines changed- src
- backend
- access/rmgrdesc
- catalog
- utils
- activity
- adt
- include
- access
- catalog
- utils
- test
- modules/injection_points
- recovery/t
- regress
- expected
- sql
17 files changed
+98
-75
lines changedLines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
319 | 319 |
| |
320 | 320 |
| |
321 | 321 |
| |
322 |
| - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
323 | 326 |
| |
324 | 327 |
| |
325 |
| - | |
| 328 | + | |
326 | 329 |
| |
327 | 330 |
| |
328 | 331 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
684 | 684 |
| |
685 | 685 |
| |
686 | 686 |
| |
687 |
| - | |
| 687 | + | |
688 | 688 |
| |
689 | 689 |
| |
690 | 690 |
| |
|
Lines changed: 23 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
846 | 846 |
| |
847 | 847 |
| |
848 | 848 |
| |
849 |
| - | |
| 849 | + | |
850 | 850 |
| |
851 | 851 |
| |
852 | 852 |
| |
| |||
855 | 855 |
| |
856 | 856 |
| |
857 | 857 |
| |
858 |
| - | |
| 858 | + | |
859 | 859 |
| |
860 | 860 |
| |
861 | 861 |
| |
| |||
926 | 926 |
| |
927 | 927 |
| |
928 | 928 |
| |
929 |
| - | |
| 929 | + | |
930 | 930 |
| |
931 | 931 |
| |
932 | 932 |
| |
| |||
941 | 941 |
| |
942 | 942 |
| |
943 | 943 |
| |
944 |
| - | |
| 944 | + | |
945 | 945 |
| |
946 | 946 |
| |
947 | 947 |
| |
| |||
967 | 967 |
| |
968 | 968 |
| |
969 | 969 |
| |
970 |
| - | |
| 970 | + | |
971 | 971 |
| |
972 | 972 |
| |
973 | 973 |
| |
| |||
1036 | 1036 |
| |
1037 | 1037 |
| |
1038 | 1038 |
| |
1039 |
| - | |
| 1039 | + | |
1040 | 1040 |
| |
1041 | 1041 |
| |
1042 | 1042 |
| |
1043 | 1043 |
| |
1044 | 1044 |
| |
1045 |
| - | |
| 1045 | + | |
1046 | 1046 |
| |
1047 | 1047 |
| |
1048 | 1048 |
| |
| |||
1257 | 1257 |
| |
1258 | 1258 |
| |
1259 | 1259 |
| |
1260 |
| - | |
| 1260 | + | |
1261 | 1261 |
| |
1262 | 1262 |
| |
1263 | 1263 |
| |
| |||
1272 | 1272 |
| |
1273 | 1273 |
| |
1274 | 1274 |
| |
1275 |
| - | |
| 1275 | + | |
1276 | 1276 |
| |
1277 | 1277 |
| |
1278 | 1278 |
| |
| |||
1295 | 1295 |
| |
1296 | 1296 |
| |
1297 | 1297 |
| |
1298 |
| - | |
| 1298 | + | |
1299 | 1299 |
| |
1300 | 1300 |
| |
1301 | 1301 |
| |
1302 |
| - | |
| 1302 | + | |
1303 | 1303 |
| |
1304 | 1304 |
| |
1305 | 1305 |
| |
| |||
1648 | 1648 |
| |
1649 | 1649 |
| |
1650 | 1650 |
| |
1651 |
| - | |
1652 |
| - | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
1653 | 1654 |
| |
1654 | 1655 |
| |
1655 | 1656 |
| |
| |||
1885 | 1886 |
| |
1886 | 1887 |
| |
1887 | 1888 |
| |
1888 |
| - | |
1889 |
| - | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
1890 | 1892 |
| |
1891 | 1893 |
| |
1892 | 1894 |
| |
| |||
1957 | 1959 |
| |
1958 | 1960 |
| |
1959 | 1961 |
| |
1960 |
| - | |
1961 |
| - | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
1962 | 1965 |
| |
1963 | 1966 |
| |
1964 | 1967 |
| |
| |||
1969 | 1972 |
| |
1970 | 1973 |
| |
1971 | 1974 |
| |
1972 |
| - | |
1973 |
| - | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
1974 | 1978 |
| |
1975 | 1979 |
| |
1976 | 1980 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
196 |
| - | |
197 |
| - | |
198 |
| - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
199 | 199 |
| |
200 | 200 |
| |
201 | 201 |
| |
| |||
209 | 209 |
| |
210 | 210 |
| |
211 | 211 |
| |
212 |
| - | |
| 212 | + | |
213 | 213 |
| |
214 | 214 |
| |
215 | 215 |
| |
|
Lines changed: 11 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
429 | 429 |
| |
430 | 430 |
| |
431 | 431 |
| |
432 |
| - | |
| 432 | + | |
433 | 433 |
| |
434 | 434 |
| |
435 |
| - | |
| 435 | + | |
436 | 436 |
| |
437 | 437 |
| |
438 | 438 |
| |
| |||
644 | 644 |
| |
645 | 645 |
| |
646 | 646 |
| |
647 |
| - | |
| 647 | + | |
648 | 648 |
| |
649 | 649 |
| |
650 | 650 |
| |
651 | 651 |
| |
652 | 652 |
| |
653 |
| - | |
| 653 | + | |
654 | 654 |
| |
655 | 655 |
| |
656 | 656 |
| |
| |||
820 | 820 |
| |
821 | 821 |
| |
822 | 822 |
| |
823 |
| - | |
| 823 | + | |
824 | 824 |
| |
825 |
| - | |
| 825 | + | |
| 826 | + | |
826 | 827 |
| |
827 | 828 |
| |
828 | 829 |
| |
| |||
905 | 906 |
| |
906 | 907 |
| |
907 | 908 |
| |
908 |
| - | |
| 909 | + | |
909 | 910 |
| |
910 |
| - | |
| 911 | + | |
911 | 912 |
| |
912 | 913 |
| |
913 | 914 |
| |
| |||
980 | 981 |
| |
981 | 982 |
| |
982 | 983 |
| |
983 |
| - | |
| 984 | + | |
984 | 985 |
| |
985 | 986 |
| |
986 | 987 |
| |
987 | 988 |
| |
988 | 989 |
| |
989 |
| - | |
| 990 | + | |
990 | 991 |
| |
991 | 992 |
| |
992 | 993 |
| |
|
Lines changed: 19 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
| 80 | + | |
80 | 81 |
| |
81 | 82 |
| |
82 | 83 |
| |
83 | 84 |
| |
84 | 85 |
| |
85 | 86 |
| |
86 | 87 |
| |
87 |
| - | |
| 88 | + | |
88 | 89 |
| |
89 | 90 |
| |
90 | 91 |
| |
| |||
93 | 94 |
| |
94 | 95 |
| |
95 | 96 |
| |
96 |
| - | |
| 97 | + | |
97 | 98 |
| |
98 | 99 |
| |
99 | 100 |
| |
| |||
149 | 150 |
| |
150 | 151 |
| |
151 | 152 |
| |
| 153 | + | |
152 | 154 |
| |
153 | 155 |
| |
154 | 156 |
| |
| |||
158 | 160 |
| |
159 | 161 |
| |
160 | 162 |
| |
161 |
| - | |
| 163 | + | |
162 | 164 |
| |
163 | 165 |
| |
164 | 166 |
| |
| |||
319 | 321 |
| |
320 | 322 |
| |
321 | 323 |
| |
| 324 | + | |
322 | 325 |
| |
323 |
| - | |
| 326 | + | |
324 | 327 |
| |
325 | 328 |
| |
326 | 329 |
| |
| |||
329 | 332 |
| |
330 | 333 |
| |
331 | 334 |
| |
332 |
| - | |
| 335 | + | |
333 | 336 |
| |
334 | 337 |
| |
335 | 338 |
| |
| |||
341 | 344 |
| |
342 | 345 |
| |
343 | 346 |
| |
344 |
| - | |
| 347 | + | |
| 348 | + | |
345 | 349 |
| |
346 | 350 |
| |
347 | 351 |
| |
| |||
354 | 358 |
| |
355 | 359 |
| |
356 | 360 |
| |
357 |
| - | |
| 361 | + | |
358 | 362 |
| |
359 |
| - | |
| 363 | + | |
360 | 364 |
| |
361 | 365 |
| |
362 |
| - | |
363 |
| - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
364 | 369 |
| |
365 |
| - | |
| 370 | + | |
366 | 371 |
| |
367 | 372 |
| |
368 |
| - | |
| 373 | + | |
369 | 374 |
| |
370 | 375 |
| |
371 | 376 |
| |
| |||
376 | 381 |
| |
377 | 382 |
| |
378 | 383 |
| |
379 |
| - | |
| 384 | + | |
380 | 385 |
| |
381 |
| - | |
| 386 | + | |
382 | 387 |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2046 | 2046 |
| |
2047 | 2047 |
| |
2048 | 2048 |
| |
2049 |
| - | |
| 2049 | + | |
2050 | 2050 |
| |
2051 | 2051 |
| |
2052 |
| - | |
| 2052 | + | |
2053 | 2053 |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
283 | 283 |
| |
284 | 284 |
| |
285 | 285 |
| |
286 |
| - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
287 | 293 |
| |
288 | 294 |
| |
289 | 295 |
| |
|
0 commit comments
Comments
(0)