Ignore lost+found when checking if a directory is empty

From: Brian Pitts <bdp(at)uga(dot)edu>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Ignore lost+found when checking if a directory is empty
Date: 2011-08-09 18:52:25
Message-ID: 4E4181E9.2010902@uga.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

--
Brian Pitts
Systems Administrator | EuPathDB Bioinformatics Resource Center
706-542-1447 | bdp(at)uga(dot)edu | http://eupathdb.org

Attachment Content-Type Size
Ignore-lost-found-when-checking-if-a-directory-is-empty.patch text/x-patch 0 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-08-09 19:10:37 Re: augmenting MultiXacts to improve foreign keys
Previous Message Alvaro Herrera 2011-08-09 18:51:03 Re: augmenting MultiXacts to improve foreign keys