Re: Ignore lost+found when checking if a directory is empty

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Brian Pitts <bdp(at)uga(dot)edu>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Ignore lost+found when checking if a directory is empty
Date: 2011-08-14 02:23:36
Message-ID: 201108140223.p7E2NaJ24955@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-08-14 04:12:19 Re: vacuum scheduling (was: index-only scans)
Previous Message Heikki Linnakangas 2011-08-13 22:18:15 Re: VACUUM FULL versus TOAST