Re: danger of stats_temp_directory = /dev/shm - Mailing list pgsql-hackers

From Tom Lane
Subject Re: danger of stats_temp_directory = /dev/shm
Date
Msg-id 24568.1376938565@sss.pgh.pa.us
Whole thread Raw
In response to Re: danger of stats_temp_directory = /dev/shm  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: danger of stats_temp_directory = /dev/shm  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-08-19 14:28:28 -0400, Tom Lane wrote:
>> One possibility is to do the initial check somewhere shortly after
>> ChangeToDataDir(), and have the GUC check hook only attempt to make a
>> check in SIGHUP context.  Unfortunately we aren't passing the context to
>> check hooks, only GucSource which isn't adequate for this.  Not sure if we
>> want to go so far as to change the check-hook API at this point.  We could
>> probably think of some other, klugy way to tell if it's initial startup.

> Is it even actually safe to have stats_temp_directory PGC_SIGHUP after
> the per DB splitup? I haven't audited the code for it, but it seems
> somewhat likely that we would end up with some files in the old and some
> in the new directory?

That's a good point.  For the moment we could just change it to
PGC_POSTMASTER and eliminate this problem.  Reducing it back to SIGHUP
would be a future feature, which is evidently less than trivial.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: danger of stats_temp_directory = /dev/shm
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: [GENERAL] currval and DISCARD ALL