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

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Brian Pitts <bdp(at)uga(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ignore lost+found when checking if a directory is empty
Date: 2011-08-09 20:03:24
Message-ID: CAJKUy5hjLoQRfWLJ2tT=K4pNyL+T6ajb-Hg29gtRnyfb9LYPww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 9, 2011 at 1:52 PM, Brian Pitts <bdp(at)uga(dot)edu> wrote:
> When an ext2, ext3, or ext4 filesystem is mounted directly on the PGDATA directory, initdb will refuse to run because it sees the
> lost+found directory that mke2fs created and assumes the PGDATA directory is already in use for something other than PostgreSQL.
> Attached is a patch against master which will cause a directory that contains only lost+found to still be treated as empty.
>
> This was previously proposed in 2001; see http://archives.postgresql.org/pgsql-hackers/2001-03/msg01194.php
>

I have wanted that before, and the patch is very simple... Peter had a
concern about that though, still a concern?
"""
Initdb or the database system can do
anything they want in that directory, so it's not good to save lost blocks
somewhere in the middle, even if chances are low you need them. I say,
create a subdirectory.
"""

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2011-08-09 20:03:26 Re: Ignore lost+found when checking if a directory is empty
Previous Message Alvaro Herrera 2011-08-09 19:50:27 Re: augmenting MultiXacts to improve foreign keys