Re: sequences vs. synchronous replication - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: sequences vs. synchronous replication
Date
Msg-id 8e24a470-b092-3c9f-0614-acd9df3f724f@enterprisedb.com
Whole thread Raw
In response to Re: sequences vs. synchronous replication  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: sequences vs. synchronous replication  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: sequences vs. synchronous replication  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers

On 12/18/21 22:27, Tom Lane wrote:
> Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
>> Here's a PoC demonstrating this idea. I'm not convinced it's the right
>> way to deal with this - it surely seems more like a duct tape fix than a
>> clean solution. But it does the trick.
> 
> I was imagining something a whole lot simpler, like "don't try to
> cache unused sequence numbers when wal_level > minimal".  We've
> accepted worse performance hits in that operating mode, and it'd
> fix a number of user complaints we've seen about weird sequence
> behavior on standbys.
> 

What do you mean by "not caching unused sequence numbers"? Reducing 
SEQ_LOG_VALS to 1, i.e. WAL-logging every sequence increment?

That'd work, but I wonder how significant the impact will be. It'd bet 
it hurts the patch adding logical decoding of sequences quite a bit.

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: sequences vs. synchronous replication
Next
From: Tom Lane
Date:
Subject: Re: sequences vs. synchronous replication