From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, aleksander(at)timescale(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pg_stop_backup() v2 incorrectly marked as proretset |
Date: | 2022-03-04 01:32:27 |
Message-ID: | 20220304.103227.1107024158855742766.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Fri, 4 Mar 2022 10:09:19 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> On Thu, Mar 03, 2022 at 04:40:42PM -0500, Tom Lane wrote:
> > The point is to make it clear that the macro isn't intended to affect
> > code outside the function. Since C lacks block-scoped macros,
> > there's no other way to do that.
> >
> > I concede that a lot of our code is pretty sloppy about this, but
> > that doesn't make it a good practice.
>
> Well, if we change that, better to do that in all the places where
> this would be affected, but I am not sure to see a style appealing
> enough on this thread.
>
> From what I can see, history shows that the style of using a #define
> for the number of columns originates from da2c1b8, aka 9.0. Its use
> inside a function originates from a755ea3 as of 9.1 and then it has
> just spread around without any undefs, so it looks like people like
> that way of doing things.
I'm one of them. Not unliking #undef, though.
It seems to me the name "PG_STOP_BACKUP_V2_COLS" alone is specific
enough for the purpose of avoiding misuse.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Ajin Cherian | 2022-03-04 01:41:16 | Re: logical replication empty transactions |
Previous Message | Masahiko Sawada | 2022-03-04 01:09:28 | Re: Add the replication origin name and commit-LSN to logical replication worker errcontext |