postgresql/src/backend/storage
Tom Lane f7b5988cc0 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
2020-07-03 17:01:34 -04:00
..
buffer Clear some style deviations. 2020-05-21 08:31:16 -07:00
file Fix temporary tablespaces for shared filesets some more. 2020-07-03 17:01:34 -04:00
freespace Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
ipc Avoid potential spinlock in a signal handler as part of global barriers. 2020-06-17 12:41:45 -07:00
large_object Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
lmgr Fix deadlock danger when atomic ops are done under spinlock. 2020-06-18 14:08:32 -07:00
page Document that pg_checksums exists in checksums README 2020-03-26 15:05:54 +01:00
smgr Clear some style deviations. 2020-05-21 08:31:16 -07:00
sync Use correct and consistent unit abbreviation 2020-06-01 21:18:36 +02:00
Makefile Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00