diff options
| author | Tom Lane | 2007-07-25 22:16:18 +0000 |
|---|---|---|
| committer | Tom Lane | 2007-07-25 22:16:18 +0000 |
| commit | 82eed4dba254b8fda71d429b29d222ffb4e93fca (patch) | |
| tree | eb84bdb8b70e931a08c23c07bc5c83d305bf19b3 /src/bin | |
| parent | fdb5b69e9c8f7186fe43c21580ac2ba45db1740f (diff) | |
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.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/psql/describe.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 041a1c14b63..6dd156af4af 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.156 2007/06/28 06:40:16 neilc Exp $ + * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.157 2007/07/25 22:16:18 tgl Exp $ */ #include "postgres_fe.h" #include "describe.h" @@ -1688,9 +1688,12 @@ listTables(const char *tabtypes, const char *pattern, bool verbose) * pg_catalog and pg_toast. (We don't want to hide temp tables though.) */ if (showSystem) - appendPQExpBuffer(&buf, " AND n.nspname = 'pg_catalog'\n"); + appendPQExpBuffer(&buf, + " AND n.nspname = 'pg_catalog'\n"); else - appendPQExpBuffer(&buf, " AND n.nspname NOT IN ('pg_catalog', 'pg_toast')\n"); + appendPQExpBuffer(&buf, + " AND n.nspname <> 'pg_catalog'\n" + " AND n.nspname !~ '^pg_toast'\n"); processSQLNamePattern(pset.db, &buf, pattern, true, false, "n.nspname", "c.relname", NULL, |
