Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdfc9028

Browse files
committed
Add C comments that HEAP_MOVED_* define usage is only for pre-9.0 binary
upgrades.
1 parent3ab41f0 commitdfc9028

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

‎src/backend/utils/time/tqual.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* Portions Copyright (c) 1994, Regents of the University of California
5151
*
5252
* IDENTIFICATION
53-
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.116 2010/02/0804:33:54 tgl Exp $
53+
* $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.117 2010/02/0814:10:21 momjian Exp $
5454
*
5555
*-------------------------------------------------------------------------
5656
*/
@@ -91,7 +91,7 @@ static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot);
9191
* code in heapam.c relies on that!)
9292
*
9393
* Also, if we are cleaning up HEAP_MOVED_IN or HEAP_MOVED_OFF entries, then
94-
* we can always set the hint bits, sinceold-style VACUUM FULL always used
94+
* we can always set the hint bits, sincepre-9.0 VACUUM FULL always used
9595
* synchronous commits and didn't move tuples that weren't previously
9696
* hinted. (This is not known by this subroutine, but is applied by its
9797
* callers.) Note: old-style VACUUM FULL is gone, but we have to keep this
@@ -167,6 +167,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
167167
if (tuple->t_infomask&HEAP_XMIN_INVALID)
168168
return false;
169169

170+
/* Used by pre-9.0 binary upgrades */
170171
if (tuple->t_infomask&HEAP_MOVED_OFF)
171172
{
172173
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -185,6 +186,7 @@ HeapTupleSatisfiesSelf(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
185186
InvalidTransactionId);
186187
}
187188
}
189+
/* Used by pre-9.0 binary upgrades */
188190
elseif (tuple->t_infomask&HEAP_MOVED_IN)
189191
{
190192
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -338,6 +340,7 @@ HeapTupleSatisfiesNow(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
338340
if (tuple->t_infomask&HEAP_XMIN_INVALID)
339341
return false;
340342

343+
/* Used by pre-9.0 binary upgrades */
341344
if (tuple->t_infomask&HEAP_MOVED_OFF)
342345
{
343346
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -356,6 +359,7 @@ HeapTupleSatisfiesNow(HeapTupleHeader tuple, Snapshot snapshot, Buffer buffer)
356359
InvalidTransactionId);
357360
}
358361
}
362+
/* Used by pre-9.0 binary upgrades */
359363
elseif (tuple->t_infomask&HEAP_MOVED_IN)
360364
{
361365
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -502,6 +506,7 @@ HeapTupleSatisfiesToast(HeapTupleHeader tuple, Snapshot snapshot,
502506
if (tuple->t_infomask&HEAP_XMIN_INVALID)
503507
return false;
504508

509+
/* Used by pre-9.0 binary upgrades */
505510
if (tuple->t_infomask&HEAP_MOVED_OFF)
506511
{
507512
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -520,6 +525,7 @@ HeapTupleSatisfiesToast(HeapTupleHeader tuple, Snapshot snapshot,
520525
InvalidTransactionId);
521526
}
522527
}
528+
/* Used by pre-9.0 binary upgrades */
523529
elseif (tuple->t_infomask&HEAP_MOVED_IN)
524530
{
525531
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -581,6 +587,7 @@ HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid,
581587
if (tuple->t_infomask&HEAP_XMIN_INVALID)
582588
returnHeapTupleInvisible;
583589

590+
/* Used by pre-9.0 binary upgrades */
584591
if (tuple->t_infomask&HEAP_MOVED_OFF)
585592
{
586593
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -599,6 +606,7 @@ HeapTupleSatisfiesUpdate(HeapTupleHeader tuple, CommandId curcid,
599606
InvalidTransactionId);
600607
}
601608
}
609+
/* Used by pre-9.0 binary upgrades */
602610
elseif (tuple->t_infomask&HEAP_MOVED_IN)
603611
{
604612
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -748,6 +756,7 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple, Snapshot snapshot,
748756
if (tuple->t_infomask&HEAP_XMIN_INVALID)
749757
return false;
750758

759+
/* Used by pre-9.0 binary upgrades */
751760
if (tuple->t_infomask&HEAP_MOVED_OFF)
752761
{
753762
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -766,6 +775,7 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple, Snapshot snapshot,
766775
InvalidTransactionId);
767776
}
768777
}
778+
/* Used by pre-9.0 binary upgrades */
769779
elseif (tuple->t_infomask&HEAP_MOVED_IN)
770780
{
771781
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -907,6 +917,7 @@ HeapTupleSatisfiesMVCC(HeapTupleHeader tuple, Snapshot snapshot,
907917
if (tuple->t_infomask&HEAP_XMIN_INVALID)
908918
return false;
909919

920+
/* Used by pre-9.0 binary upgrades */
910921
if (tuple->t_infomask&HEAP_MOVED_OFF)
911922
{
912923
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -925,6 +936,7 @@ HeapTupleSatisfiesMVCC(HeapTupleHeader tuple, Snapshot snapshot,
925936
InvalidTransactionId);
926937
}
927938
}
939+
/* Used by pre-9.0 binary upgrades */
928940
elseif (tuple->t_infomask&HEAP_MOVED_IN)
929941
{
930942
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -1066,6 +1078,7 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin,
10661078
{
10671079
if (tuple->t_infomask&HEAP_XMIN_INVALID)
10681080
returnHEAPTUPLE_DEAD;
1081+
/* Used by pre-9.0 binary upgrades */
10691082
elseif (tuple->t_infomask&HEAP_MOVED_OFF)
10701083
{
10711084
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);
@@ -1083,6 +1096,7 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin,
10831096
SetHintBits(tuple,buffer,HEAP_XMIN_COMMITTED,
10841097
InvalidTransactionId);
10851098
}
1099+
/* Used by pre-9.0 binary upgrades */
10861100
elseif (tuple->t_infomask&HEAP_MOVED_IN)
10871101
{
10881102
TransactionIdxvac=HeapTupleHeaderGetXvac(tuple);

‎src/include/access/htup.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/access/htup.h,v 1.111 2010/02/0804:33:54 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/access/htup.h,v 1.112 2010/02/0814:10:21 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -176,9 +176,11 @@ typedef HeapTupleHeaderData *HeapTupleHeader;
176176
#defineHEAP_XMAX_IS_MULTI0x1000/* t_xmax is a MultiXactId */
177177
#defineHEAP_UPDATED0x2000/* this is UPDATEd version of row */
178178
#defineHEAP_MOVED_OFF0x4000/* moved to another place by
179-
* old-style VACUUM FULL */
179+
* pre-9.0 VACUUM FULL; kept
180+
* for binary upgrade support */
180181
#defineHEAP_MOVED_IN0x8000/* moved from another place by
181-
* old-style VACUUM FULL */
182+
* pre-9.0 VACUUM FULL; kept
183+
* for binary upgrade support */
182184
#defineHEAP_MOVED (HEAP_MOVED_OFF | HEAP_MOVED_IN)
183185

184186
#defineHEAP_XACT_MASK0xFFE0/* visibility-related bits */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp