hot_standby_feedback implementation

Started by Christophe Pettusalmost 5 years ago3 messagesgeneral
Jump to latest
#1Christophe Pettus
xof@thebuild.com

When a replica sends a hot_standby_feedback message to the primary, does that create an entry in the primary's lock table, or is it flagged to autovacuum some other way?

In reply to: Christophe Pettus (#1)
Re: hot_standby_feedback implementation

On Tue, Jun 15, 2021 at 5:24 PM Christophe Pettus <xof@thebuild.com> wrote:

When a replica sends a hot_standby_feedback message to the primary, does that create an entry in the primary's lock table, or is it flagged to autovacuum some other way?

It pretty much works by making the WAL sender process on the primary
look like it holds a snapshot that's as old as the oldest snapshot on
the replica.

A replica can block VACUUM on the primary *directly* by holding a
table-level lock, though in practice only when somebody on the replica
acquires an AccessExclusiveLock -- which is presumably rare in
practice.

--
Peter Geoghegan

#3Christophe Pettus
xof@thebuild.com
In reply to: Peter Geoghegan (#2)
Re: hot_standby_feedback implementation

On Jun 15, 2021, at 17:30, Peter Geoghegan <pg@bowt.ie> wrote:
It pretty much works by making the WAL sender process on the primary
look like it holds a snapshot that's as old as the oldest snapshot on
the replica.

A replica can block VACUUM on the primary *directly* by holding a
table-level lock, though in practice only when somebody on the replica
acquires an AccessExclusiveLock -- which is presumably rare in
practice.

Thank you! Attempting to track down a sudden burst of every session waiting on lock_manager LW locks, and part of that is finding the source of locks.