forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit37484ad
committed
Change the way we mark tuples as frozen.
Instead of changing the tuple xmin to FrozenTransactionId, the combinationof HEAP_XMIN_COMMITTED and HEAP_XMIN_INVALID, which were previously neverset together, is now defined as HEAP_XMIN_FROZEN. A variety of previousproposals to freeze tuples opportunistically before vacuum_freeze_min_ageis reached have foundered on the objection that replacing xmin byFrozenTransactionId might hinder debugging efforts when things in thisarea go awry; this patch is intended to solve that problem by keepingthe XID around (but largely ignoring the value to which it is set).Third-party code that checks for HEAP_XMIN_INVALID on tuples whereHEAP_XMIN_COMMITTED might be set will be broken by this change. To fix,use the new accessor macros in htup_details.h rather than consulting thebits directly. HeapTupleHeaderGetXmin has been modified to returnFrozenTransactionId when the infomask bits indicate that the tuple isfrozen; use HeapTupleHeaderGetRawXmin when you already know that thetuple isn't marked commited or frozen, or want the raw value anyway.We currently do this in routines that display the xmin for user consumption,in tqual.c where it's known to be safe and important for the avoidance ofextra cycles, and in the function-caching code for various procedurallanguages, which shouldn't invalidate the cache just because the tuplegets frozen.Robert Haas and Andres Freund1 parent961bf59 commit37484ad
File tree
17 files changed
+125
-84
lines changed- contrib/pageinspect
- src
- backend
- access
- common
- heap
- commands
- storage/buffer
- utils
- fmgr
- time
- include/access
- pl
- plperl
- plpgsql/src
- plpython
- tcl
17 files changed
+125
-84
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
165 |
| - | |
| 165 | + | |
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
539 | 539 |
| |
540 | 540 |
| |
541 | 541 |
| |
542 |
| - | |
| 542 | + | |
543 | 543 |
| |
544 | 544 |
| |
545 | 545 |
| |
|
Lines changed: 7 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2257 | 2257 |
| |
2258 | 2258 |
| |
2259 | 2259 |
| |
| 2260 | + | |
2260 | 2261 |
| |
2261 |
| - | |
2262 |
| - | |
2263 |
| - | |
2264 |
| - | |
2265 |
| - | |
2266 |
| - | |
| 2262 | + | |
| 2263 | + | |
2267 | 2264 |
| |
2268 | 2265 |
| |
2269 | 2266 |
| |
| |||
5732 | 5729 |
| |
5733 | 5730 |
| |
5734 | 5731 |
| |
5735 |
| - | |
5736 |
| - | |
5737 |
| - | |
5738 |
| - | |
5739 |
| - | |
5740 |
| - | |
5741 |
| - | |
| 5732 | + | |
5742 | 5733 |
| |
5743 | 5734 |
| |
5744 | 5735 |
| |
| |||
5882 | 5873 |
| |
5883 | 5874 |
| |
5884 | 5875 |
| |
5885 |
| - | |
5886 |
| - | |
5887 |
| - | |
5888 | 5876 |
| |
5889 | 5877 |
| |
5890 | 5878 |
| |
| |||
6361 | 6349 |
| |
6362 | 6350 |
| |
6363 | 6351 |
| |
6364 |
| - | |
6365 |
| - | |
6366 |
| - | |
6367 |
| - | |
| 6352 | + | |
| 6353 | + | |
6368 | 6354 |
| |
6369 | 6355 |
| |
6370 | 6356 |
| |
| |||
6882 | 6868 |
| |
6883 | 6869 |
| |
6884 | 6870 |
| |
6885 |
| - | |
| 6871 | + | |
6886 | 6872 |
| |
6887 | 6873 |
| |
6888 | 6874 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
361 | 361 |
| |
362 | 362 |
| |
363 | 363 |
| |
364 |
| - | |
| 364 | + | |
365 | 365 |
| |
366 | 366 |
| |
367 |
| - | |
| 367 | + | |
368 | 368 |
| |
369 | 369 |
| |
370 | 370 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
823 | 823 |
| |
824 | 824 |
| |
825 | 825 |
| |
826 |
| - | |
827 |
| - | |
| 826 | + | |
| 827 | + | |
828 | 828 |
| |
829 | 829 |
| |
830 | 830 |
| |
831 | 831 |
| |
832 | 832 |
| |
833 |
| - | |
| 833 | + | |
834 | 834 |
| |
835 | 835 |
| |
836 | 836 |
| |
| |||
1774 | 1774 |
| |
1775 | 1775 |
| |
1776 | 1776 |
| |
1777 |
| - | |
| 1777 | + | |
1778 | 1778 |
| |
1779 | 1779 |
| |
1780 | 1780 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 |
| |
69 | 72 |
| |
70 | 73 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
514 | 514 |
| |
515 | 515 |
| |
516 | 516 |
| |
517 |
| - | |
| 517 | + | |
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
| |||
552 | 552 |
| |
553 | 553 |
| |
554 | 554 |
| |
555 |
| - | |
| 555 | + | |
556 | 556 |
| |
557 | 557 |
| |
558 | 558 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
151 |
| - | |
| 151 | + | |
152 | 152 |
| |
153 | 153 |
| |
154 |
| - | |
155 |
| - | |
| 154 | + | |
| 155 | + | |
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
|
Lines changed: 36 additions & 35 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
169 |
| - | |
| 169 | + | |
170 | 170 |
| |
171 |
| - | |
| 171 | + | |
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
| |||
210 | 210 |
| |
211 | 211 |
| |
212 | 212 |
| |
213 |
| - | |
| 213 | + | |
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
| |||
244 | 244 |
| |
245 | 245 |
| |
246 | 246 |
| |
247 |
| - | |
| 247 | + | |
248 | 248 |
| |
249 |
| - | |
| 249 | + | |
250 | 250 |
| |
251 |
| - | |
| 251 | + | |
252 | 252 |
| |
253 | 253 |
| |
254 | 254 |
| |
| |||
356 | 356 |
| |
357 | 357 |
| |
358 | 358 |
| |
359 |
| - | |
| 359 | + | |
360 | 360 |
| |
361 |
| - | |
| 361 | + | |
362 | 362 |
| |
363 | 363 |
| |
364 | 364 |
| |
| |||
441 | 441 |
| |
442 | 442 |
| |
443 | 443 |
| |
444 |
| - | |
| 444 | + | |
445 | 445 |
| |
446 |
| - | |
| 446 | + | |
447 | 447 |
| |
448 | 448 |
| |
449 | 449 |
| |
| |||
485 | 485 |
| |
486 | 486 |
| |
487 | 487 |
| |
488 |
| - | |
| 488 | + | |
489 | 489 |
| |
490 | 490 |
| |
491 | 491 |
| |
| |||
564 | 564 |
| |
565 | 565 |
| |
566 | 566 |
| |
567 |
| - | |
| 567 | + | |
568 | 568 |
| |
569 |
| - | |
| 569 | + | |
570 | 570 |
| |
571 |
| - | |
| 571 | + | |
572 | 572 |
| |
573 | 573 |
| |
574 | 574 |
| |
| |||
715 | 715 |
| |
716 | 716 |
| |
717 | 717 |
| |
718 |
| - | |
| 718 | + | |
719 | 719 |
| |
720 |
| - | |
| 720 | + | |
721 | 721 |
| |
722 | 722 |
| |
723 | 723 |
| |
| |||
759 | 759 |
| |
760 | 760 |
| |
761 | 761 |
| |
762 |
| - | |
| 762 | + | |
763 | 763 |
| |
764 | 764 |
| |
765 | 765 |
| |
| |||
793 | 793 |
| |
794 | 794 |
| |
795 | 795 |
| |
796 |
| - | |
| 796 | + | |
797 | 797 |
| |
798 |
| - | |
| 798 | + | |
799 | 799 |
| |
800 | 800 |
| |
801 | 801 |
| |
802 |
| - | |
| 802 | + | |
803 | 803 |
| |
804 |
| - | |
| 804 | + | |
805 | 805 |
| |
806 | 806 |
| |
807 | 807 |
| |
| |||
909 | 909 |
| |
910 | 910 |
| |
911 | 911 |
| |
912 |
| - | |
| 912 | + | |
913 | 913 |
| |
914 |
| - | |
| 914 | + | |
915 | 915 |
| |
916 | 916 |
| |
917 | 917 |
| |
| |||
953 | 953 |
| |
954 | 954 |
| |
955 | 955 |
| |
956 |
| - | |
| 956 | + | |
957 | 957 |
| |
958 | 958 |
| |
959 | 959 |
| |
| |||
995 | 995 |
| |
996 | 996 |
| |
997 | 997 |
| |
998 |
| - | |
| 998 | + | |
999 | 999 |
| |
1000 |
| - | |
| 1000 | + | |
1001 | 1001 |
| |
1002 |
| - | |
| 1002 | + | |
1003 | 1003 |
| |
1004 | 1004 |
| |
1005 | 1005 |
| |
| |||
1013 | 1013 |
| |
1014 | 1014 |
| |
1015 | 1015 |
| |
1016 |
| - | |
| 1016 | + | |
| 1017 | + | |
1017 | 1018 |
| |
1018 | 1019 |
| |
1019 | 1020 |
| |
| |||
1116 | 1117 |
| |
1117 | 1118 |
| |
1118 | 1119 |
| |
1119 |
| - | |
| 1120 | + | |
1120 | 1121 |
| |
1121 |
| - | |
| 1122 | + | |
1122 | 1123 |
| |
1123 | 1124 |
| |
1124 | 1125 |
| |
| |||
1157 | 1158 |
| |
1158 | 1159 |
| |
1159 | 1160 |
| |
1160 |
| - | |
| 1161 | + | |
1161 | 1162 |
| |
1162 | 1163 |
| |
1163 | 1164 |
| |
| |||
1168 | 1169 |
| |
1169 | 1170 |
| |
1170 | 1171 |
| |
1171 |
| - | |
| 1172 | + | |
1172 | 1173 |
| |
1173 |
| - | |
| 1174 | + | |
1174 | 1175 |
| |
1175 | 1176 |
| |
1176 | 1177 |
| |
| |||
1347 | 1348 |
| |
1348 | 1349 |
| |
1349 | 1350 |
| |
1350 |
| - | |
1351 |
| - | |
| 1351 | + | |
| 1352 | + | |
1352 | 1353 |
| |
1353 | 1354 |
| |
1354 | 1355 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
277 |
| - | |
| 277 | + | |
278 | 278 |
| |
279 | 279 |
| |
280 | 280 |
| |
|
0 commit comments
Comments
(0)