Re: Bump default wal_level to logical

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Bump default wal_level to logical
Дата
Msg-id 977b6922-9e5c-eb6e-778d-9b19c0145b54@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Bump default wal_level to logical  (Andres Freund <andres@anarazel.de>)
Ответы Re: Bump default wal_level to logical  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Re: Bump default wal_level to logical  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Global snapshots
Следующее
От: David Rowley
Дата:
Сообщение: Speedup usages of pg_*toa() functions