Re: pg_archivecleanup bug

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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: 2014-03-18 18:55:40
Message-ID: 20140318185540.GY6899@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs escribió:
> On 18 March 2014 18:18, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > On Tue, Mar 18, 2014 at 06:11:30PM +0000, Simon Riggs wrote:

> >> Why make style changes at all? A patch with no style changes would
> >> mean backpatch and HEAD versions would be the same.
> >
> > The old style had errno set in two places in the loop, while the new
> > style has it set in only one place.
>
> Seems better to leave the previously-good coding in place. ISTM to be
> clearer to use simple C.

If you're saying we should use that style in all readdir loops, with the
errno=0 before the loop and at the bottom of it, I don't disagree.
Let's just make sure they're all safe though (i.e. watch out for
"continue" for instance).

That said, I don't find comma expression to be particularly "not
simple".

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2014-03-18 18:56:25 Re: plpgsql.warn_shadow
Previous Message Heikki Linnakangas 2014-03-18 18:54:52 Re: Failure while inserting parent tuple to B-tree is not fun