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)
commit8661f62693e53554b6e76b6f9a9ed2682ad67471
tree5d14e9f0acc157b2a1f0278aa2d0ce9b7e1a4955
parent94d1ac42504ef79ed7269ebfa1965ef08d7c496b
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