Skip site navigation (1) Skip section navigation (2)

pgsql: Generalize concept of temporary relations to "relationpersisten

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Generalize concept of temporary relations to "relationpersisten
Date: 2010-12-13 17:35:28
Message-ID: E1PSCJ6-0006pd-Ks@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=5f7b58fad8f45c69bb67944779dce67e2f481995

Modified Files
--------------
src/backend/access/gin/ginbtree.c     |    6 +-
src/backend/access/gin/ginfast.c      |    6 +-
src/backend/access/gin/gininsert.c    |    4 +-
src/backend/access/gin/ginutil.c      |    2 +-
src/backend/access/gin/ginvacuum.c    |    4 +-
src/backend/access/gist/gist.c        |   12 +++---
src/backend/access/gist/gistvacuum.c  |    2 +-
src/backend/access/heap/heapam.c      |   34 +++++++-------
src/backend/access/heap/pruneheap.c   |    2 +-
src/backend/access/heap/rewriteheap.c |    6 +-
src/backend/access/nbtree/nbtinsert.c |    6 +-
src/backend/access/nbtree/nbtpage.c   |   10 ++--
src/backend/access/nbtree/nbtsort.c   |   12 +++---
src/backend/bootstrap/bootparse.y     |    2 +
src/backend/catalog/catalog.c         |   16 ++++++-
src/backend/catalog/heap.c            |   13 +++--
src/backend/catalog/index.c           |   10 +++--
src/backend/catalog/namespace.c       |   12 +++---
src/backend/catalog/storage.c         |   24 ++++++++--
src/backend/catalog/toasting.c        |    3 +-
src/backend/commands/cluster.c        |    5 +-
src/backend/commands/indexcmds.c      |    4 +-
src/backend/commands/sequence.c       |    8 ++--
src/backend/commands/tablecmds.c      |   79 ++++++++++++++++++--------------
src/backend/commands/tablespace.c     |    8 ++--
src/backend/commands/vacuumlazy.c     |   11 ++---
src/backend/commands/view.c           |   13 +++---
src/backend/executor/execMain.c       |    9 +++-
src/backend/nodes/copyfuncs.c         |    2 +-
src/backend/nodes/equalfuncs.c        |    2 +-
src/backend/nodes/makefuncs.c         |    3 +-
src/backend/nodes/outfuncs.c          |    2 +-
src/backend/nodes/readfuncs.c         |    2 +-
src/backend/parser/gram.y             |   61 ++++++++++++-------------
src/backend/parser/parse_utilcmd.c    |    7 ++-
src/backend/postmaster/autovacuum.c   |    4 +-
src/backend/storage/buffer/bufmgr.c   |    4 +-
src/backend/utils/adt/dbsize.c        |   28 ++++++++----
src/backend/utils/cache/relcache.c    |   71 ++++++++++++++++++-----------
src/include/catalog/catalog.h         |    2 +-
src/include/catalog/catversion.h      |    2 +-
src/include/catalog/heap.h            |    2 +
src/include/catalog/pg_class.h        |   15 ++++---
src/include/catalog/storage.h         |    2 +-
src/include/commands/tablespace.h     |    2 +-
src/include/nodes/primnodes.h         |    2 +-
src/include/utils/rel.h               |   25 ++++++++++-
src/include/utils/relcache.h          |    3 +-
48 files changed, 334 insertions(+), 230 deletions(-)

Responses

pgsql-committers by date

Next:From: Tom LaneDate: 2010-12-13 17:38:47
Subject: Re: pgsql: Generalize concept of temporary relations to "relation persisten
Previous:From: Andrew DunstanDate: 2010-12-13 16:37:57
Subject: Re: [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group