Re: pg_archivecleanup bug

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_archivecleanup bug
Date: 2013-12-09 16:27:28
Message-ID: CA+TgmoYfpZFKjpac2EPP2RcjnEjE0L9A=UDFr_iKaWVtwm5mMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 5, 2013 at 6:15 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> But the other usages seem to be in assorted utilities, which
> will need to do it right for themselves. initdb.c's walkdir() seems to
> have it right and might be a reasonable model to follow. Or maybe we
> should invent a frontend-friendly version of ReadDir() rather than
> duplicating all the error checking code in ten-and-counting places?

If there's enough uniformity in all of those places to make that
feasible, it certainly seems wise to do it that way. I don't know if
that's the case, though - e.g. maybe some callers want to exit and
others do not. pg_resetxlog wants to exit; pg_archivecleanup and
pg_standby most likely want to print an error and carry on.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-12-09 16:28:49 Re: BUG #8673: Could not open file "pg_multixact/members/xxxx" on slave during hot_standby
Previous Message Robert Haas 2013-12-09 16:21:59 Re: pg_archivecleanup bug