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

From Andres Freund
Subject Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces
Date
Msg-id 20170606023843.hcwq7hvegiokzkdf@alap3.anarazel.de
Whole thread Raw
In response to Re: [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  (Bruce Momjian <bruce@momjian.us>)
Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 2017-06-05 22:34:17 -0400, Bruce Momjian wrote:
> On Mon, Jun  5, 2017 at 04:38:32PM -0500, Jerry Sievers wrote:
> > The SAN snaps capture the entire pgdata and WAL pg_xlog area but there
> > is no attempt to copy the NVME device when the snaps are made.
> > 
> > There's an event trigger plus batch job now running tou avoid this risk.
> > 
> > We realize too that there are implications here if a backup is
> > instantiated and PITR is done.
> > 
> > Just FYI that there could be others running like this ignorant of the
> > potential gotchas.
> 
> Yes, if we implement the TODO you will create a TEMPORARY tablespace
> that can't contain non-temporary and/or non-unlogged tables.

FWIW, allowing UNLOGGED tables, rather than just TEMPORARY ones,
increases the complexity of that project noticeably.  For TEMPORARY you
basically don't need to do much but to recreate the structure inside the
tablespace at start - fairly simple.  But for UNLOGGED you need to find
a way to recreate the relevant file and init forks - otherwise we might
not notice what needs to be reset at a crash restart, and we might error
out when executing selects etc. and then the table's not there.
Presumably recreating files & init forks that at first table access is
doable, but it's not entirely trivial to do locking wise.

- Andres



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces