pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Xuneng Zhou <xunengzhou@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Amit Kapila <amitkapila16@gmail.com>
Cc: Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
Cc: shveta malik <shveta.malik@gmail.com>
Subject: Re: Logical slot creation/synchronization on a standby may deadlock with recovery conflict resolution
Date: Thu, 24 Sep 2026 09:28:33 +0000
Message-ID: <arTtQeXjXFVcycpK@bdtpg> (raw)
In-Reply-To: <CABPTF7WV9LMJQJGyPYa6zPziGfWgjKLR0OU_7ntGV+E9-D2D7g@mail.gmail.com>
References: <CABPTF7WV9LMJQJGyPYa6zPziGfWgjKLR0OU_7ntGV+E9-D2D7g@mail.gmail.com>

Hi,

On Thu, Sep 24, 2026 at 03:49:35PM +0800, Xuneng Zhou wrote:
> Hi hackers,
> 
> I don't see a clear solution to this potential issue, because the interface
> is a function, which means that the held snapshots cannot be popped cleanly
> since they belong to the surrounding executor.

Thanks for the report and reproducers!

Thinking out loud, I wonder if we could add a transient PGPROC state while a
backend depends on recovery replay. After deadlock_timeout, ResolveRecoveryConflictWithVirtualXIDs()
could check whether a VXID in its waitlist has that state set and, if so, use the
existing recovery conflict cancellation path.

Does that make sense to you and others? If so, I can have a look at preparing a
patch.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com






view thread (7+ messages)  latest in thread

Message-ID: <arTtQeXjXFVcycpK@bdtpg>
Permalink:  ../arTtQeXjXFVcycpK@bdtpg/
Also on:    postgresql.org/message-id/arTtQeXjXFVcycpK@bdtpg

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: bertranddrouvot.pg@gmail.com, xunengzhou@gmail.com, andres@anarazel.de, amitkapila16@gmail.com, houzj.fnst@fujitsu.com, shveta.malik@gmail.com
  Subject: Re: Logical slot creation/synchronization on a standby may deadlock with recovery conflict resolution
  In-Reply-To: <arTtQeXjXFVcycpK@bdtpg>
  References: <CABPTF7WV9LMJQJGyPYa6zPziGfWgjKLR0OU_7ntGV+E9-D2D7g@mail.gmail.com> <arTtQeXjXFVcycpK@bdtpg>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox