From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
Cc: | Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>, Christoph Berg <myon(at)debian(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to implement pg_current_logfile() function |
Date: | 2016-11-23 15:36:11 |
Message-ID: | CA+TgmoaMtQKwZgAoAwrek2xeBtXV3UJJx_r-CaTuW0ebHpzELQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 23, 2016 at 4:21 AM, Karl O. Pinc <kop(at)meme(dot)com> wrote:
> patch_pg_current_logfile-v14.diff.bool_to_int
>
> Do not include in "main" patch, submit to maintainers separately.
>
> Applies on top of patch_pg_current_logfile-v14.diff
>
> 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.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-11-23 15:39:28 | Re: Patch to implement pg_current_logfile() function |
Previous Message | Tom Lane | 2016-11-23 15:26:29 | Re: Patch to implement pg_current_logfile() function |