From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Improve pg_check_dir code and comments. |
Date: | 2015-02-17 15:49:28 |
Message-ID: | CA+TgmoYh_LMqA6WnLRJb9+iC9hmMaYvA3KOD_iXrkeMT-8MKfg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Tue, Feb 17, 2015 at 10:45 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <rhaas(at)postgresql(dot)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.
OK, I'll work on that.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-02-17 15:57:17 | pgsql: Improve pg_check_dir code and comments. |
Previous Message | Tom Lane | 2015-02-17 15:45:24 | Re: pgsql: Improve pg_check_dir code and comments. |