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

Commitdfed001

Browse files
committed
Have the rewriteheap code freeze old tuples. This is safe because it is only
applied to live tuples older than a recent Xmin, not to tuples that may be partof an update chain. Those still keep their original markings.This patch makes it possible for CLUSTER to advance relfrozenxid, thus avoidingthe need of vacuuming the table for Xid wraparound purposes. That will bepatched separately.Patch from Heikki Linnakangas.
1 parentd365ce1 commitdfed001

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
* Portions Copyright (c) 1994-5, Regents of the University of California
9797
*
9898
* IDENTIFICATION
99-
* $PostgreSQL: pgsql/src/backend/access/heap/rewriteheap.c,v 1.3 2007/04/17 21:29:31 tgl Exp $
99+
* $PostgreSQL: pgsql/src/backend/access/heap/rewriteheap.c,v 1.4 2007/05/16 16:36:56 alvherre Exp $
100100
*
101101
*-------------------------------------------------------------------------
102102
*/
@@ -538,6 +538,8 @@ raw_heap_insert(RewriteState state, HeapTuple tup)
538538
OffsetNumbernewoff;
539539
HeapTupleheaptup;
540540

541+
heap_freeze_tuple(tup->t_data,state->rs_oldest_xmin,InvalidBuffer);
542+
541543
/*
542544
* If the new tuple is too big for storage or contains already toasted
543545
* out-of-line attributes from some other relation, invoke the toaster.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp