Re: src/ports/pgcheckdir.c - Ignore dot directories...

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Sean Chittenden <sean(at)chittenden(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: src/ports/pgcheckdir.c - Ignore dot directories...
Date: 2013-02-14 23:07:04
Message-ID: 20130214230704.GB2895@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 5, 2013 at 08:49:17AM -0500, Peter Eisentraut wrote:
> On 2/5/13 7:32 AM, Kevin Grittner wrote:
> > Sean Chittenden <sean(at)chittenden(dot)org> wrote:
> >
> >> > Currently src/port/pgcheckdir.c will reject non-empty
> >> > directories, which is an issue during initdb(1) when PGDATA is
> >> > also the mount point for filesystems that support snapshots (e.g.
> >> > ZFS or UFS2).
> >> > Granted it's not hard to create a subdirectory, initdb there and
> >> > move the contents of the files around, it's extra work that
> >> > shouldn't be required.
> > I feel that it is very bad practice to use the mount point as the
> > PGDATA directory. It forcloses a lot of reasonable actions that
> > someone managing the database server might want to take.
>
> Yes, a variant of this particular patch gets rejected about once every
> 18 months.

Agreed. The attached patch modifies pg_check_dir() to report about
invisible and lost+found directory entries, and give more helpful
messages to the user.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

Attachment Content-Type Size
mount.diff text/x-diff 4.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2013-02-14 23:41:52 Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system
Previous Message Noah Misch 2013-02-14 22:59:57 Re: BUG #7493: Postmaster messages unreadable in a Windows console