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 20130815015746.GE6351@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: danger of stats_temp_directory = /dev/shm  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> I think we should change 9.3 to be restrictive about ownership/permissions
> on the stats_temp_directory (ie, require owner = postgres user,
> permissions = 0700, same as for the $PGDATA directory).  I agree that
> back-patching such a change to the older branches is probably not a good
> plan.  I can't quite parse what you say above, so I'm not sure if you're
> fully agreeing with that position or not.
> 
> In addition to that, it might be a good idea to do what the comment in the
> code suggests, namely do more than zero checking on each file name to try
> to make sure it looks like a stats temp file name that we'd generate
> before we delete it.  The ownership/permissions test wouldn't be enough
> to prevent you from pointing at, say, ~postgres and thereby losing some
> files you'd rather not.

I will look into this.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: danger of stats_temp_directory = /dev/shm
Next
From: "Etsuro Fujita"
Date:
Subject: Re: Incorrect information in src/backend/optimizer/README