mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Move the tuple freezing point in CLUSTER to a point further back in the past,
to avoid losing useful Xid information in not-so-old tuples. This makes CLUSTER behave the same as VACUUM as far a tuple-freezing behavior goes (though CLUSTER does not yet advance the table's relfrozenxid). While at it, move the actual freezing operation in rewriteheap.c to a more appropriate place, and document it thoroughly. This part of the patch from Tom Lane.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994-5, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/access/rewriteheap.h,v 1.1 2007/04/08 01:26:33 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/rewriteheap.h,v 1.2 2007/05/17 15:28:29 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -20,10 +20,11 @@
|
||||
typedef struct RewriteStateData *RewriteState;
|
||||
|
||||
extern RewriteState begin_heap_rewrite(Relation NewHeap,
|
||||
TransactionId OldestXmin, bool use_wal);
|
||||
TransactionId OldestXmin, TransactionId FreezeXid,
|
||||
bool use_wal);
|
||||
extern void end_heap_rewrite(RewriteState state);
|
||||
extern void rewrite_heap_tuple(RewriteState state, HeapTuple oldTuple,
|
||||
HeapTuple newTuple);
|
||||
HeapTuple newTuple);
|
||||
extern void rewrite_heap_dead_tuple(RewriteState state, HeapTuple oldTuple);
|
||||
|
||||
#endif /* REWRITE_HEAP_H */
|
||||
|
||||
Reference in New Issue
Block a user