Re: make MaxBackends available in _PG_init - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: make MaxBackends available in _PG_init
Date
Msg-id 20220511041211.GA3848903@nathanxps13
Whole thread Raw
In response to Re: make MaxBackends available in _PG_init  (Michael Paquier <michael@paquier.xyz>)
Responses Re: make MaxBackends available in _PG_init
List pgsql-hackers
On Wed, May 11, 2022 at 11:18:29AM +0900, Michael Paquier wrote:
> 0002 looks pretty good from here.  If it were me, I would apply 0002
> first to avoid the extra tweak in pg_stat_statements with _PG_fini in
> 0001.

I swapped 0001 and 0002 in v8.

> Regarding 0001, I have spotted an extra issue in the documentation.
> xfunc.sgml has a section called "Shared Memory and LWLocks" about the
> use of RequestNamedLWLockTranche() and RequestAddinShmemSpace() called
> from _PG_init(), which would now be wrong as we'd need the hook.  IMO,
> the docs should mention the registration of the hook in _PG_init(),
> the APIs involved, and should mention to look at pg_stat_statements.c
> for a code sample (we tend to avoid the addition of sample code in the
> docs lately as we habe no way to check their compilation
> automatically).

Ah, good catch.  I adjusted the docs as you suggested.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply
Next
From: Ashutosh Bapat
Date:
Subject: Re: Allowing REINDEX to have an optional name