From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Improve pg_check_dir code and comments.
Date: Tue, 17 Feb 2015 10:45:24 -0500
Message-ID: <25821.1424187924@sss.pgh.pa.us> (raw)
In-Reply-To: <E1YNk8Q-0004Il-0h@gemulon.postgresql.org>
References: <E1YNk8Q-0004Il-0h@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Robert Haas <rhaas@postgresql.org> writes:
> Improve pg_check_dir code and comments.
> Avoid losing errno if readdir() fails and closedir() works. Consistently
> return 4 rather than 3 if both a lost+found directory and other files are
> found, rather than returning one value or the other depending on the
> order of the directory listing. Update comments to match the actual
> behavior.
> These oversights date to commits 6f03927fce038096f53ca67eeab9adb24938f8a6
> and 17f15239325a88581bb4f9cf91d38005f1f52d69.
In that case, doesn't this need to be back-patched?
In addition to the problems you cite, the previous coding appears to fail
to close the directory handle if readdir() fails, which is certainly a
significant enough bug to merit back-patching.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, rhaas@postgresql.org
Subject: Re: pgsql: Improve pg_check_dir code and comments.
In-Reply-To: <25821.1424187924@sss.pgh.pa.us>
References: <E1YNk8Q-0004Il-0h@gemulon.postgresql.org> <25821.1424187924@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox