public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Gurjeet Singh <[email protected]>
Cc: Postgres Hackers <[email protected]>
Subject: Re: lwlocknames.h beautification attempt
Date: Sun, 02 Mar 2025 01:26:07 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CABwTF4VxfwDtRV-H22_XK4XeDogaV-Vaobu+af5U=8ZAZn9ZZQ@mail.gmail.com>
References: <CABwTF4VxfwDtRV-H22_XK4XeDogaV-Vaobu+af5U=8ZAZn9ZZQ@mail.gmail.com>
Gurjeet Singh <[email protected]> writes:
> I propose the following change to the generation script,
> generate-lwlocknames.pl
> ...
> which produces the lock names in this format
> #define ShmemIndexLock (&MainLWLockArray[1].lock)
> #define OidGenLock (&MainLWLockArray[2].lock)
> #define XidGenLock (&MainLWLockArray[3].lock)
> #define ProcArrayLock (&MainLWLockArray[4].lock)
> #define SInvalReadLock (&MainLWLockArray[5].lock)
This looks reasonably in line with project style ...
> Yet another format, which I prefer, can be achieved by right-aligning the
> lock names.
> #define ShmemIndexLock (&MainLWLockArray[1].lock)
> #define OidGenLock (&MainLWLockArray[2].lock)
> #define XidGenLock (&MainLWLockArray[3].lock)
> #define ProcArrayLock (&MainLWLockArray[4].lock)
> #define SInvalReadLock (&MainLWLockArray[5].lock)
... but that doesn't. I challenge you to provide even one example
of that layout in our source tree, or to explain why it's better.
regards, tom lane
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: lwlocknames.h beautification attempt
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox