pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix temporary tablespaces for shared filesets some more.
Date: Fri, 03 Jul 2020 21:02:00 +0000
Message-ID: <E1jrSoq-0004DO-FR@gemulon.postgresql.org> (raw)

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f7b5988cc0d879d6cc9d481ba898e55747a53bbe

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(-)



view thread (14+ messages)  latest in thread

Message-ID: <E1jrSoq-0004DO-FR@gemulon.postgresql.org>
Permalink:  ../E1jrSoq-0004DO-FR@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jrSoq-0004DO-FR@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix temporary tablespaces for shared filesets some more.
  In-Reply-To: <E1jrSoq-0004DO-FR@gemulon.postgresql.org>
  References: <E1jrSoq-0004DO-FR@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox