pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor InitPostgres() to use bitwise option flags
Date: Wed, 11 Oct 2023 03:32:49 +0000
Message-ID: <E1qqPxo-0014oz-P6@gemulon.postgresql.org> (raw)

Refactor InitPostgres() to use bitwise option flags

InitPostgres() has been using a set of boolean arguments to control its
behavior, and a patch under discussion was aiming at expanding it with a
third one.  In preparation for expanding this area, this commit switches
all the current boolean arguments of this routine to a single bits32
argument instead.  Two values are currently supported for the flags:
- INIT_PG_LOAD_SESSION_LIBS to load [session|local]_preload_libraries at
startup.
- INIT_PG_OVERRIDE_ALLOW_CONNS to allow connection to a database even if
it has !datallowconn.  This is used by bgworkers.

Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/ZSTn66_BXRZCeaqS@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4800a5dfb4c46d22b5d05f16c615bea6ff24a2bb

Modified Files
--------------
src/backend/bootstrap/bootstrap.c   |  2 +-
src/backend/postmaster/autovacuum.c |  5 ++---
src/backend/postmaster/postmaster.c | 16 ++++++++++++----
src/backend/tcop/postgres.c         |  5 +++--
src/backend/utils/init/postinit.c   | 17 +++++++++--------
src/include/miscadmin.h             |  6 ++++--
6 files changed, 31 insertions(+), 20 deletions(-)



Message-ID: <E1qqPxo-0014oz-P6@gemulon.postgresql.org>
Permalink:  ../E1qqPxo-0014oz-P6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qqPxo-0014oz-P6@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Refactor InitPostgres() to use bitwise option flags
  In-Reply-To: <E1qqPxo-0014oz-P6@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox