Re: Ignore lost+found when checking if a directory is empty - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Ignore lost+found when checking if a directory is empty
Date
Msg-id 201108140223.p7E2NaJ24955@momjian.us
Whole thread Raw
In response to Re: Ignore lost+found when checking if a directory is empty  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Excerpts from Jeff Davis's message of mar ago 09 16:03:26 -0400 2011:
> >> I think I agree with Peter here that it's not a very good idea, and I
> >> don't see a big upside. With tablespaces it seems to make a little bit
> >> more sense, but I'd still lean away from that idea.
> 
> > What if the init script tries to start postmaster before the filesystems
> > are mounted?  ISTM requiring a subdir is a good sanity check that the
> > system is ready to run.  Not creating stuff directly on the mountpoint
> > ensures consistency.
> 
> I went looking in the archives for previous discussions of this idea.
> Most of them seem to focus on tablespaces rather than the primary data
> directory, but the objections to doing it are pretty much the same

FYI, the 9.0+ code will create a subdirectory under the tablespace
directory named after the catversion number, and it doesn't check that
the directory is empty, particularly so pg_upgrade can do its magic.
So, I believe lost+found would work in such a case, but again, the
security issues are real.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: VACUUM FULL versus TOAST
Next
From: Robert Haas
Date:
Subject: Re: vacuum scheduling (was: index-only scans)