Re: stats_temp_directory conflicts - Mailing list pgsql-hackers

From Tom Lane
Subject Re: stats_temp_directory conflicts
Date
Msg-id 21648.1546217225@sss.pgh.pa.us
Whole thread Raw
In response to stats_temp_directory conflicts  (Noah Misch <noah@leadboat.com>)
Responses Re: stats_temp_directory conflicts
List pgsql-hackers
Noah Misch <noah@leadboat.com> writes:
> I'm thinking the server should manage this; during startup, create
> $stats_temp_directory/PostgreSQL.$postmaster_pid and store each stats file
> therein.

+1

> Just before creating that directory, scan $stats_temp_directory and
> delete subdirectories that no longer correspond to live PIDs.

Hm, seems potentially racy, if multiple postmasters are starting
at the same time.  The only one you can be *sure* is dead is one
with your own PID.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: stats_temp_directory conflicts
Next
From: Ian Barwick
Date:
Subject: Re: Minor comment fix for pg_config_manual.h