Re: GetRelationPath() vs critical sections - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GetRelationPath() vs critical sections
Date
Msg-id 2987320.1740116114@sss.pgh.pa.us
Whole thread Raw
In response to Re: GetRelationPath() vs critical sections  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Fri, Feb 21, 2025 at 9:28 AM Andres Freund <andres@anarazel.de> wrote:
>> The patch curently uses a hardcoded 6 for the length of MAX_BACKENDS. Does
>> anybody have a good idea for how to either
>> 
>> a) derive 6 from MAX_BACKENDS in a way that can be used in a C array size

This all seems quite over-the-top to me.  Just allocate 10 characters,
which is certainly enough for the output of a %u format spec, and
call it good.

(Yeah, I know that's not as much fun, but ...)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: GetRelationPath() vs critical sections
Next
From: Thomas Munro
Date:
Subject: Re: GetRelationPath() vs critical sections