Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC9Vv-00080N-FQ for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Jul 2022 00:49:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oC9Vu-0007PF-7l for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Jul 2022 00:49:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC9Vt-0007P6-VC for pgsql-bugs@lists.postgresql.org; Fri, 15 Jul 2022 00:49:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC9Vr-0006kO-QU for pgsql-bugs@postgresql.org; Fri, 15 Jul 2022 00:49:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 26F0mvnD3192875; Thu, 14 Jul 2022 20:48:57 -0400 From: Tom Lane To: Jeff Davis cc: pgsql-bugs@postgresql.org 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> Comments: In-reply-to Jeff Davis message dated "Thu, 14 Jul 2022 17:22:54 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3192873.1657846137.1@sss.pgh.pa.us> Date: Thu, 14 Jul 2022 20:48:57 -0400 Message-ID: <3192874.1657846137@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Davis writes: > 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? Hmm. There may have been some idea that a library might fail in single-user mode, and/or have been the cause of you needing to use single-user in the first place. But if so, you can always edit it out of shared_preload_libraries. I agree that not having the option to load it isn't great. I think that the patch might be missing some stuff. In postmaster.c, there are several steps after process_shared_preload_libraries() that look to be there to support loadable libraries, such as process_shmem_requests(). Wouldn't it be reasonable to expect that a loadable library would malfunction without those? (I wonder if we shouldn't refactor this so that the postmaster and standalone mode share more of the initialization logic. Keeping these bits in sync seems unlikely to happen otherwise.) regards, tom lane