diff options
| author | Alvaro Herrera | 2007-05-17 15:28:29 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2007-05-17 15:28:29 +0000 |
| commit | 3b0347b36e1f59e5db95e8994948d850bfc90472 (patch) | |
| tree | 437bc425e994ac31daf0775e476b7315b939070c /src/include | |
| parent | 90cbc63fd10adaeb01c3180156e0e48eee08b5ed (diff) | |
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.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/rewriteheap.h | 7 | ||||
| -rw-r--r-- | src/include/commands/vacuum.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/include/access/rewriteheap.h b/src/include/access/rewriteheap.h index e8f53246a81..4f9515d566f 100644 --- a/src/include/access/rewriteheap.h +++ b/src/include/access/rewriteheap.h @@ -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 */ diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index b77fbf4c719..acb2f623e27 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.70 2007/03/13 00:33:43 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.71 2007/05/17 15:28:29 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -119,7 +119,7 @@ extern void vac_update_relstats(Oid relid, double num_tuples, bool hasindex, TransactionId frozenxid); -extern void vacuum_set_xid_limits(VacuumStmt *vacstmt, bool sharedRel, +extern void vacuum_set_xid_limits(int freeze_min_age, bool sharedRel, TransactionId *oldestXmin, TransactionId *freezeLimit); extern void vac_update_datfrozenxid(void); |
