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 1mVygU-0006Tj-CK for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Sep 2021 16:13:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mVygT-00036z-9T for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Sep 2021 16:13:21 +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 1mVygT-00036q-1m for pgsql-hackers@lists.postgresql.org; Thu, 30 Sep 2021 16:13:21 +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 1mVygM-0006Ty-C1 for pgsql-hackers@lists.postgresql.org; Thu, 30 Sep 2021 16:13:19 +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 18UGCs2L3080927; Thu, 30 Sep 2021 12:12:54 -0400 From: Tom Lane To: Alvaro Herrera cc: Andrew Dunstan , "Bossart, Nathan" , Kyotaro Horiguchi , "andres@anarazel.de" , "masao.fujii@oss.nttdata.com" , "pgsql-hackers@lists.postgresql.org" , "mengjuan.cmj@alibaba-inc.com" , "Jakub.Wartak@tomtom.com" , Ryo Matsumura Subject: Re: prevent immature WAL streaming In-reply-to: <202109301432.mou5kmj3h2r6@alvherre.pgsql> References: <202109301432.mou5kmj3h2r6@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 30 Sep 2021 11:32:57 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3080925.1633018374.1@sss.pgh.pa.us> Date: Thu, 30 Sep 2021 12:12:54 -0400 Message-ID: <3080926.1633018374@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2021-Sep-30, Tom Lane wrote: >> There's still the issue of these tests overriding postgresql.conf >> entries made by init(), but maybe we can live with that? > I vote to at least have has_archiving=>1 set wal_level=replica, and > potentially max_wal_senders=2 too (allows pg_basebackup). I think this requires a bit more investigation. I looked quickly through the pre-existing tests that set has_archiving=>1, and every single one of them also sets allows_streaming=>1, which no doubt explains why this issue hasn't come up before. So now I'm wondering if any of those other tests is setting allows_streaming only because of this configuration issue. More to the point, since we've not previously used the combination of has_archiving without allows_streaming, I wonder exactly how we want to define it to work. I'm not really convinced that it should be defined as "allows basebackup even though replication is supposed to be off". Perhaps a compromise could be to invent a third option "allows_basebackup", so that init() actually knows what's going on? regards, tom lane