diff options
| author | Tom Lane | 2007-03-29 00:15:39 +0000 |
|---|---|---|
| committer | Tom Lane | 2007-03-29 00:15:39 +0000 |
| commit | fba8113c1b74b9508cf2e6b7a18b0fb3637d9ba0 (patch) | |
| tree | b70081c09aa6f06b442f4f43313e738a693de7ea /src/include/utils | |
| parent | 4591fb1aa8c0f8c2d724c2a83e1a336650cca933 (diff) | |
Teach CLUSTER to skip writing WAL if not needed (ie, not using archiving)
--- Simon.
Also, code review and cleanup for the previous COPY-no-WAL patches --- Tom.
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/rel.h | 8 | ||||
| -rw-r--r-- | src/include/utils/relcache.h | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 2963cc6616a..33795de2bf8 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.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/utils/rel.h,v 1.99 2007/03/19 23:38:32 wieck Exp $ + * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.100 2007/03/29 00:15:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -138,13 +138,17 @@ typedef struct RelationData char rd_indexvalid; /* state of rd_indexlist: 0 = not valid, 1 = * valid, 2 = temporarily forced */ SubTransactionId rd_createSubid; /* rel was created in current xact */ - SubTransactionId rd_newRelfilenodeSubid; /* rel had new relfilenode in current xact */ + SubTransactionId rd_newRelfilenodeSubid; /* new relfilenode assigned + * in current xact */ /* * rd_createSubid is the ID of the highest subtransaction the rel has * survived into; or zero if the rel was not created in the current top * transaction. This should be relied on only for optimization purposes; * it is possible for new-ness to be "forgotten" (eg, after CLUSTER). + * Likewise, rd_newRelfilenodeSubid is the ID of the highest subtransaction + * the relfilenode change has survived into, or zero if not changed in + * the current transaction (or we have forgotten changing it). */ Form_pg_class rd_rel; /* RELATION tuple */ TupleDesc rd_att; /* tuple descriptor */ diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index c7b549d1cff..25b60082a09 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.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/utils/relcache.h,v 1.58 2007/03/03 20:08:41 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.59 2007/03/29 00:15:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -60,12 +60,12 @@ extern void RelationCacheInvalidateEntry(Oid relationId); extern void RelationCacheInvalidate(void); -extern void RelationCacheResetAtEOXact(void); - extern void AtEOXact_RelationCache(bool isCommit); extern void AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid, SubTransactionId parentSubid); +extern void RelationCacheMarkNewRelfilenode(Relation rel); + /* * Routines to help manage rebuilding of relcache init file */ |
