pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: David Fetter <david@fetter.org>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Subject: Re: Bump default wal_level to logical
Date: Tue, 9 Jun 2020 08:52:24 +0200
Message-ID: <977b6922-9e5c-eb6e-778d-9b19c0145b54@2ndquadrant.com> (raw)
In-Reply-To: <20200608213215.mgk3cctlzvfuaqm6@alap3.anarazel.de>
References: <20200608171619.GA11063@alvherre.pgsql>
	<2021525.1591637270@sss.pgh.pa.us>
	<20200608213215.mgk3cctlzvfuaqm6@alap3.anarazel.de>

On 2020-06-08 23:32, Andres Freund wrote:
> On 2020-06-08 13:27:50 -0400, Tom Lane wrote:
>> 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 ...
> 
> There's reasons, but IIRC they're all solvable with reasonable effort. I
> think most of it boils down to only being able to rely on the new
> wal_level after a while. For minimal->recovery we basically need a
> checkpoint started after the change in configuration, and for
> recovery->logical we need to wait until all sessions have a) read the
> new config setting b) finished the transaction that used the old
> setting.

The best behavior from a user's perspective would be if the WAL level 
automatically switched to logical if logical replication slots are 
present.  You might not even need 'logical' as an actual value of 
wal_level anymore, you just need to keep a flag in shared memory that 
records whether at least one logical slot exists.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (26+ messages)  latest in thread

Message-ID: <977b6922-9e5c-eb6e-778d-9b19c0145b54@2ndquadrant.com>
Permalink:  ../977b6922-9e5c-eb6e-778d-9b19c0145b54@2ndquadrant.com/
Also on:    postgresql.org/message-id/977b6922-9e5c-eb6e-778d-9b19c0145b54@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, andres@anarazel.de, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, tomas.vondra@2ndquadrant.com, magnus@hagander.net, michael@paquier.xyz, amit.kapila16@gmail.com, david@fetter.org
  Subject: Re: Bump default wal_level to logical
  In-Reply-To: <977b6922-9e5c-eb6e-778d-9b19c0145b54@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox