Re: Patch to implement pg_current_logfile() function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch to implement pg_current_logfile() function
Date
Msg-id 28113.1479915568@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch to implement pg_current_logfile() function  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Patch to implement pg_current_logfile() function  ("Karl O. Pinc" <kop@meme.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Nov 23, 2016 at 4:21 AM, Karl O. Pinc <kop@meme.com> wrote:
>> The bool types on the stack in logfile_rotate() are
>> my work.  Bools on the stack don't make sense as far
>> as hardware goes, so the compiler's optimizer should change
>> them to int.  This patch changes the bools to ints
>> should that be to someone's taste.

> That does not seem like a good idea from here.  Even if it buys some
> microscopic speedup, in a place like this it won't matter.  It's more
> important that the code be clear, and using an int where you really
> intend a bool isn't an improvement as far as clarity goes.

Not to mention that the "bools on the stack don't make sense" premise
is bogus anyway.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch to implement pg_current_logfile() function
Next
From: Tom Lane
Date:
Subject: Re: [RFC] Should we fix postmaster to avoid slow shutdown?