pgsql: Fix temporary tablespaces for shared filesets

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix temporary tablespaces for shared filesets
Date: 2020-07-03 13:13:24
Message-ID: E1jrLVM-0001Po-FI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix temporary tablespaces for shared filesets

A likely copy/paste error in 98e8b480532 from back in 2004 would
cause temp tablespace to be reset to InvalidOid if temp_tablespaces
was set to the same value as the primary tablespace in the database.
This would cause shared filesets (such as for parallel hash joins)
to ignore them, putting the temporary files in the default tablespace
instead of the configured one. The bug is in the old code, but it
appears to have been exposed only once we had shared filesets.

Reviewed-By: Daniel Gustafsson
Discussion: https://postgr.es/m/CABUevExg5YEsOvqMxrjoNvb3ApVyH+9jggWGKwTDFyFCVWczGQ@mail.gmail.com
Backpatch-through: 9.5

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4aa02d0729f01e6f381a2ffbf052a0d54dcbdb82

Modified Files
--------------
src/backend/commands/tablespace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-07-03 19:42:16 pgsql: Inline plpgsql's exec_stmt() into exec_stmts().
Previous Message Fujii Masao 2020-07-03 03:09:31 pgsql: doc: Correct description of restart_lsn in pg_replication_slots