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

From Alvaro Herrera
Subject Re: danger of stats_temp_directory = /dev/shm
Date
Msg-id 20130425014245.GR2169@eldon.alvh.no-ip.org
Whole thread Raw
In response to danger of stats_temp_directory = /dev/shm  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: danger of stats_temp_directory = /dev/shm
List pgsql-hackers
Jeff Janes escribió:
> With the stats file split patch 187492b6c2e8cafc5 introduced in 9.3dev, now
> after a crash the postmaster will try to delete all files in the directory
> stats_temp_directory.  When that is just a subdirectory of PGDATA, this is
> fine. But it seems rather hostile when it is set to a shared directory,
> like the popular /dev/shm.

> Does this need to be fixed, or at least documented?

I think we need it fixed so that it only deletes the files matching a
well-known pattern.  In fact, there's an XXX comment about this in the
code:
/* XXX should we try to ignore files other than the ones we write? */

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Failing start-up archive recovery at Standby mode in PG9.2.4
Next
From: KONDO Mitsumasa
Date:
Subject: Re: Failing start-up archive recovery at Standby mode in PG9.2.4