From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix temporary tablespaces for shared filesets some more. |
Date: | 2020-07-03 21:02:00 |
Message-ID: | E1jrSoq-0004DP-Fo@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix temporary tablespaces for shared filesets some more.
Commit ecd9e9f0b fixed the problem in the wrong place, causing unwanted
side-effects on the behavior of GetNextTempTableSpace(). Instead,
let's make SharedFileSetInit() responsible for subbing in the value
of MyDatabaseTableSpace when the default tablespace is called for.
The convention about what is in the tempTableSpaces[] array is
evidently insufficiently documented, so try to improve that.
It also looks like SharedFileSetInit() is doing the wrong thing in the
case where temp_tablespaces is empty. It was hard-wiring use of the
pg_default tablespace, but it seems like using MyDatabaseTableSpace
is more consistent with what happens for other temp files.
Back-patch the reversion of PrepareTempTablespaces()'s behavior to
9.5, as ecd9e9f0b was. The changes in SharedFileSetInit() go back
to v11 where that was introduced. (Note there is net zero code change
before v11 from these two patch sets, so nothing to release-note.)
Magnus Hagander and Tom Lane
Discussion: https://postgr.es/m/CABUevExg5YEsOvqMxrjoNvb3ApVyH+9jggWGKwTDFyFCVWczGQ@mail.gmail.com
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/cfe89f5e6b7874e89dac7d9511b1894a7d033870
Modified Files
--------------
src/backend/commands/tablespace.c | 7 ++++++-
src/backend/storage/file/fd.c | 14 +++++++++++---
src/backend/storage/file/sharedfileset.c | 18 +++++++++++++++++-
3 files changed, 34 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-07-03 23:01:40 | pgsql: Clamp total-tuples estimates for foreign tables to ensure planne |
Previous Message | Tom Lane | 2020-07-03 19:42:16 | pgsql: Inline plpgsql's exec_stmt() into exec_stmts(). |