From: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, 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>, "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 18:04:13 |
Message-ID: | 20161123120413.5727a589@slate.meme.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 23 Nov 2016 10:39:28 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Wed, Nov 23, 2016 at 4:21 AM, Karl O. Pinc <kop(at)meme(dot)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.
Thanks. I don't think I've paid attention since 8088 days, just always
used bools. We'll drop that patch then.
But this reminds me. I should have used a bool return value.
Attached is a version 2 of
patch_pg_current_logfile-v14.diff.deletion-v2
Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Attachment | Content-Type | Size |
---|---|---|
patch_pg_current_logfile-v14.diff.deletion-v2 | application/octet-stream | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2016-11-23 18:16:11 | Re: postgres 9.3 postgres_fdw ::LOG: could not receive data from client: Connection reset by peer |
Previous Message | Alvaro Herrera | 2016-11-23 17:49:37 | Re: patch: function xmltable |