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 1jlyHT-0007MY-Ql for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jun 2020 17:24:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlyHS-0006rJ-MG for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jun 2020 17:24:50 +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 1jlyHS-0006rC-FQ for pgsql-hackers@lists.postgresql.org; Thu, 18 Jun 2020 17:24:50 +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 1jlyHQ-0001QR-Cq for pgsql-hackers@postgresql.org; Thu, 18 Jun 2020 17:24:49 +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 05IHOc5B1554845; Thu, 18 Jun 2020 13:24:38 -0400 From: Tom Lane To: Robert Haas cc: Fujii Masao , Jehan-Guillaume de Rorthais , PostgreSQL-development Subject: Re: [patch] demote In-reply-to: References: <20200617174451.222078b4@firost> <2eb2fd8f-c9a0-ac31-66dc-2c56dd048540@oss.nttdata.com> Comments: In-reply-to Robert Haas message dated "Thu, 18 Jun 2020 13:16:23 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1554843.1592501078.1@sss.pgh.pa.us> Date: Thu, 18 Jun 2020 13:24:38 -0400 Message-ID: <1554844.1592501078@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > ... To go back to recovery rather than just to a read-only > state, I think you'd need to grapple with some additional issues that > patch doesn't touch, like some of the snapshot-taking stuff, but I > think you still need to solve all of the problems that it does deal > with, unless you're OK with killing every session. It seems like this is the core decision that needs to be taken. If we're willing to have these state transitions include a server restart, then many things get simpler. If we're not, it's gonna cost us in code complexity and hence bugs. Maybe the usability gain is worth it, or maybe not. I think it would probably be worth the trouble to pursue both designs in parallel for awhile, so we can get a better handle on exactly how much complexity we're buying into with the more ambitious definition. regards, tom lane