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 1jiLZB-0001Dg-Q4 for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2020 17:28:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jiLZA-0005SP-FX for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2020 17:28:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jiLZA-0005SI-8a for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2020 17:28:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jiLZ7-00013T-Ki for pgsql-hackers@postgresql.org; Mon, 08 Jun 2020 17:28:07 +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 058HRooW2021526; Mon, 8 Jun 2020 13:27:50 -0400 From: Tom Lane To: Alvaro Herrera cc: Tomas Vondra , Magnus Hagander , Michael Paquier , Amit Kapila , David Fetter , PostgreSQL Development Subject: Re: Bump default wal_level to logical In-reply-to: <20200608171619.GA11063@alvherre.pgsql> References: <20200608171619.GA11063@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 08 Jun 2020 13:16:19 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2021524.1591637270.1@sss.pgh.pa.us> Date: Mon, 08 Jun 2020 13:27:50 -0400 Message-ID: <2021525.1591637270@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > I think it's reasonable to push our default limits for slots, > walsenders, max_bgworkers etc a lot higher than current value (say 10 -> > 100). An unused slot wastes essentially no resources; an unused > walsender is just one PGPROC entry. If we did that, and also allowed > wal_level to be changed on the fly, we wouldn't need to restart in order > to enable logical replication, so there would be little or no pressure > to change the wal_level default. Unused PGPROC entries will still consume semaphores, which is problematic on at least some OSes. It's not really clear to me why the default for walsenders would need to be O(100) anyway. The existing default of 10 already ought to be enough to cover approximately 99.999% of use cases. If we can allow wal_level to be changed on the fly, I agree that would help reduce the pressure to make the default setting more expensive. I don't recall why it's PGC_POSTMASTER right now, but I suppose there was a reason for that ... regards, tom lane