Re: Use of non-restart-safe storage by temp_tablespaces

From: Christoph Berg <myon(at)debian(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: Use of non-restart-safe storage by temp_tablespaces
Date: 2017-05-30 11:10:25
Message-ID: 20170530111024.7lqos3naq5hbqiz2@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Tom Lane 2017-05-29 <28291(dot)1496087708(at)sss(dot)pgh(dot)pa(dot)us>
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On May 29, 2017 12:15:37 PM PDT, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> >> I think it'd be smart to support the use case directly, because there's
> >> interest in it being actually supported (unlike the statu quo).
> >> Something like restoring the tablespace to the empty state on boot, if
> >> it's known to need it.
>
> > Has the danger of making recovery harder after a restart where somebody forgot to mount some subdirectory ...
>
> Or even worse, the mount happens after PG starts (and creates directories
> on the root volume, not knowing they should go onto the mount instead).
>
> I'm too lazy to search the archives right now, but there was some case
> years ago where somebody destroyed their database via an ill-thought-out
> combination of automatic-initdb-if-$PGDATA-isn't-there and slow mounting.
> We'd have to be very sure that any auto-directory-creation behavior didn't
> have a potential for that. Perhaps doing it only for temp tablespaces
> alleviates some of the risk, but it still seems pretty scary.

stats_temp_directory has the same problem. In that case, the risk of
breaking something by calling mkdir() instead of aborting startup
seems pretty low to me.

Christoph

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Ladhe 2017-05-30 11:21:26 Re: Adding support for Default partition in partitioning
Previous Message Ashutosh Bapat 2017-05-30 10:50:16 Re: Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE