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 1oCCEK-0000og-8O for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Jul 2022 03:43:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oCCEJ-0005ru-0Y for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Jul 2022 03:43:03 +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 1oCCEI-0005j0-Nh for pgsql-bugs@lists.postgresql.org; Fri, 15 Jul 2022 03:43:02 +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 1oCCEG-000879-B6 for pgsql-bugs@postgresql.org; Fri, 15 Jul 2022 03:43:01 +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 26F3gubf3228528; Thu, 14 Jul 2022 23:42:56 -0400 From: Tom Lane To: Andres Freund cc: Jeff Davis , pgsql-bugs@postgresql.org Subject: Re: [15] Custom WAL resource managers, single user mode, and recovery In-reply-to: <20220715033215.7dubjyp4tbl3zkot@awork3.anarazel.de> References: <9decc18a42634f8a2f15c97a385a0f51a752f396.camel@j-davis.com> <3192874.1657846137@sss.pgh.pa.us> <20220715033215.7dubjyp4tbl3zkot@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 14 Jul 2022 20:32:15 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3228526.1657856576.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 14 Jul 2022 23:42:56 -0400 Message-ID: <3228527.1657856576@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2022-07-14 20:48:57 -0400, Tom Lane wrote: >> (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.) > Yes, that might be worthwhile. OTOH, I wonder if we should spend that ti= me to > remove single user mode instead - the architectural complexity really do= esn't > seem worth it anymore, and IMO my prototype from a few months back showe= d that > it's feasible. I dunno ... if your DB is in bad enough shape that you need to resort to single-user mode, you probably don't want any more moving parts in the system than you absolutely have to have. Autovacuum, custom background workers, and the like are going to be counterproductive. regards, tom lane