From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-bugs@postgresql.org
Subject: [15] Custom WAL resource managers, single user mode, and recovery
Date: Thu, 14 Jul 2022 17:22:54 -0700
Message-ID: <9decc18a42634f8a2f15c97a385a0f51a752f396.camel@j-davis.com> (raw)
Single user mode doesn't process shared_preload_libraries, which is a
problem if custom WAL resource managers are in use and recovery is
required.
I attached a simple patch to process shared_preload_libraries even in
single user mode.
If a user has custom table access methods, those are likely to be
required during single user mode anyway (to VACUUM, for instance), so
we need to be able to load modules during single user mode. I can't
think of a reason specifically why we can't process
shared_preload_libraries. Thoughts?
Regards,
Jeff Davis
Attachments:single-user-custom-rmgr.patch (text/x-patch, 530B) downloaddiff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.cindex cbce480eab2..a48b6d4feb0 100644--- a/src/backend/tcop/postgres.c+++ b/src/backend/tcop/postgres.c@@ -4009,6 +4009,11 @@ PostgresSingleUserMain(int argc, char *argv[],
/* read control file (error checking and contains config ) */
LocalProcessControlFile(false);
+ /*+ * process any libraries that should be preloaded at postmaster start+ */+ process_shared_preload_libraries();+
/* Initialize MaxBackends */
InitializeMaxBackends();
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pgsql@j-davis.com
Subject: Re: [15] Custom WAL resource managers, single user mode, and recovery
In-Reply-To: <9decc18a42634f8a2f15c97a385a0f51a752f396.camel@j-davis.com>
References: <9decc18a42634f8a2f15c97a385a0f51a752f396.camel@j-davis.com>
* 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