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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, 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-15 17:12:03
Message-ID: 20130215171203.GA12030@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 14, 2013 at 07:21:27PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > 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.
>
> I'm not terribly thrilled with special-casing 'lost+found' like that,
> since it's an extremely filesystem-dependent thing that even today
> probably only applies to a minority of our installed platforms.
>
> The special case for dotfiles might be useful, not because of any
> connection to mount points but just because someone might forget
> that such could be lurking in a directory that "looks empty".

I was ready to give up on this patch, but then I thought, what
percentage does lost+found and dot-file-only directories cover for mount
points? What other cases are there?

This updated version of the patch reports about dot files if they are
the _only_ files in the directory, and it suggests a top-level mount
point might be the cause.

Does this help?

--
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 5.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2013-02-15 17:16:45 Re: Unarchived WALs deleted after crash
Previous Message Fujii Masao 2013-02-15 17:09:52 Re: Prevent restored WAL files from being archived again Re: Unnecessary WAL archiving after failover