OSDN Git Service

Arrange to put TOAST tables belonging to temporary tables into special schemas
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Jul 2007 22:16:18 +0000 (22:16 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Jul 2007 22:16:18 +0000 (22:16 +0000)
commit82eed4dba254b8fda71d429b29d222ffb4e93fca
treeeb84bdb8b70e931a08c23c07bc5c83d305bf19b3
parentfdb5b69e9c8f7186fe43c21580ac2ba45db1740f
Arrange to put TOAST tables belonging to temporary tables into special schemas
named pg_toast_temp_nnn, alongside the pg_temp_nnn schemas used for the temp
tables themselves.  This allows low-level code such as the relcache to
recognize that these tables are indeed temporary, which enables various
optimizations such as not WAL-logging changes and using local rather than
shared buffers for access.  Aside from obvious performance benefits, this
provides a solution to bug #3483, in which other backends unexpectedly held
open file references to temporary tables.  The scheme preserves the property
that TOAST tables are not in any schema that's normally in the search path,
so they don't conflict with user table names.

initdb forced because of changes in system view definitions.
contrib/oid2name/oid2name.c
src/backend/catalog/catalog.c
src/backend/catalog/namespace.c
src/backend/catalog/system_views.sql
src/backend/catalog/toasting.c
src/backend/storage/lmgr/lmgr.c
src/backend/utils/cache/relcache.c
src/bin/psql/describe.c
src/include/catalog/catversion.h
src/include/catalog/namespace.h
src/test/regress/expected/rules.out