Re: Disallow quorum uncommitted (with synchronous standbys) txns in logical replication subscribers

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Disallow quorum uncommitted (with synchronous standbys) txns in logical replication subscribers
Date: 2022-01-07 19:50:28
Message-ID: 9c0ed09c37222f738f12bd7461d142c9ca61f98c.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2022-01-08 at 00:13 +0530, Bharath Rupireddy wrote:
> If there are long running txns on the primary and the async standbys
> were to wait until quorum commit from sync standbys, won't they fall
> behind the primary by too much?

No, because replication is based on LSNs, not transactions.

With the proposed change: an LSN can be replicated to all sync replicas
as soon as it's durable on the primary; and an LSN can be replicated to
all async replicas as soon as it's durable on the primary *and* the
sync rep quorum is satisfied.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bossart, Nathan 2022-01-07 20:20:02 Re: make MaxBackends available in _PG_init
Previous Message Justin Pryzby 2022-01-07 19:21:10 Re: libpq compression (part 2)