Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces - Mailing list pgsql-hackers

From Claudio Freire
Subject Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces
Date
Msg-id CAGTBQpaGTvHCHZU9cKYw+tBrKTn0wmCa4fyHJPRSRs700CXdCg@mail.gmail.com
Whole thread Raw
In response to [HACKERS] Use of non-restart-safe storage by temp_tablespaces  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Mon, May 29, 2017 at 3:53 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Right now we don't document that temp_tablespaces can use
> non-restart-safe storage, e.g. /tmp, ramdisks.  Would this be safe?
> Should we document this?

I have set up things like that, but it's nontrivial.

Just pointing the tablespace to non'restart'safe storage will get you
an installation that fails to boot after a restart, since there's a
tree structure that is expected to survive, and when it's not found,
postgres just fails to boot.

Or just use the tablespaces, I forget which. But in essence, it won't
do to do just that. What I ended up doing was backing up the empty
tablespace and adding a restore to system bootup scripts, so that
after a restart postgres finds an empty tablespace there.

So, there's a lot of internal hackery to document if you'd like to
document that kind of usage.



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] logical replication busy-waiting on a lock
Next
From: Jeff Janes
Date:
Subject: Re: [HACKERS] psql: Activate pager only for height, not width