From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bump default wal_level to logical |
Date: | 2020-06-09 17:20:25 |
Message-ID: | 20200609172025.lgl3pmuquais2w7k@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2020-06-09 08:52:24 +0200, Peter Eisentraut wrote:
> 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.
Yea, it'd be good to have that. But you'd need the same type of
coordination mentioned above, no?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-06-09 17:46:28 | Re: elog(DEBUG2 in SpinLocked section. |
Previous Message | Andres Freund | 2020-06-09 17:19:04 | Re: Physical replication slot advance is not persistent |