]> granicus.if.org Git - postgresql/commit
Generalize concept of temporary relations to "relation persistence".
authorRobert Haas <rhaas@postgresql.org>
Mon, 13 Dec 2010 17:34:26 +0000 (12:34 -0500)
committerRobert Haas <rhaas@postgresql.org>
Mon, 13 Dec 2010 17:34:26 +0000 (12:34 -0500)
commit5f7b58fad8f45c69bb67944779dce67e2f481995
treefae9ba84d982d83e9505546facfe17369909994a
parent0c90442355fbbe785740669f63141f24674c8958
Generalize concept of temporary relations to "relation persistence".

This commit replaces pg_class.relistemp with pg_class.relpersistence;
and also modifies the RangeVar node type to carry relpersistence rather
than istemp.  It also removes removes rd_istemp from RelationData and
instead performs the correct computation based on relpersistence.

For clarity, we add three new macros: RelationNeedsWAL(),
RelationUsesLocalBuffers(), and RelationUsesTempNamespace(), so that we
can clarify the purpose of each check that previous depended on
rd_istemp.

This is intended as infrastructure for the upcoming unlogged tables
patch, as well as for future possible work on global temporary tables.
48 files changed:
src/backend/access/gin/ginbtree.c
src/backend/access/gin/ginfast.c
src/backend/access/gin/gininsert.c
src/backend/access/gin/ginutil.c
src/backend/access/gin/ginvacuum.c
src/backend/access/gist/gist.c
src/backend/access/gist/gistvacuum.c
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/access/heap/rewriteheap.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtsort.c
src/backend/bootstrap/bootparse.y
src/backend/catalog/catalog.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/namespace.c
src/backend/catalog/storage.c
src/backend/catalog/toasting.c
src/backend/commands/cluster.c
src/backend/commands/indexcmds.c
src/backend/commands/sequence.c
src/backend/commands/tablecmds.c
src/backend/commands/tablespace.c
src/backend/commands/vacuumlazy.c
src/backend/commands/view.c
src/backend/executor/execMain.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/makefuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/parser/gram.y
src/backend/parser/parse_utilcmd.c
src/backend/postmaster/autovacuum.c
src/backend/storage/buffer/bufmgr.c
src/backend/utils/adt/dbsize.c
src/backend/utils/cache/relcache.c
src/include/catalog/catalog.h
src/include/catalog/catversion.h
src/include/catalog/heap.h
src/include/catalog/pg_class.h
src/include/catalog/storage.h
src/include/commands/tablespace.h
src/include/nodes/primnodes.h
src/include/utils/rel.h
src/include/utils/relcache.h