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

Commit054b78b

Browse files
committed
Now that xmax and cmin are distinct fields again, we should zero xmax when
creating a new tuple. This is just for debugging sanity, though, sincenothing should be paying any attention to xmax when the HEAP_XMAX_INVALIDbit is set.
1 parent12ce26f commit054b78b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.175 2004/09/16 16:58:25 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.176 2004/09/17 18:09:55 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -1142,7 +1142,8 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid)
11421142
tup->t_data->t_infomask |=HEAP_XMAX_INVALID;
11431143
HeapTupleHeaderSetXmin(tup->t_data,xid);
11441144
HeapTupleHeaderSetCmin(tup->t_data,cid);
1145-
HeapTupleHeaderSetCmax(tup->t_data,0);/* zero out Datum fields */
1145+
HeapTupleHeaderSetXmax(tup->t_data,0);/* zero out Datum fields */
1146+
HeapTupleHeaderSetCmax(tup->t_data,0);/* for cleanliness */
11461147
tup->t_tableOid=relation->rd_id;
11471148

11481149
/*
@@ -1608,7 +1609,8 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
16081609
newtup->t_data->t_infomask |= (HEAP_XMAX_INVALID |HEAP_UPDATED);
16091610
HeapTupleHeaderSetXmin(newtup->t_data,xid);
16101611
HeapTupleHeaderSetCmin(newtup->t_data,cid);
1611-
HeapTupleHeaderSetCmax(newtup->t_data,0);/* zero out Datum fields */
1612+
HeapTupleHeaderSetXmax(newtup->t_data,0);/* zero out Datum fields */
1613+
HeapTupleHeaderSetCmax(newtup->t_data,0);/* for cleanliness */
16121614

16131615
/*
16141616
* If the toaster needs to be activated, OR if the new tuple will not

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp