Re: Assertion failure in update_local_synced_slot(), slotsync.c:364

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Zhijie Hou <houzhijie22(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assertion failure in update_local_synced_slot(), slotsync.c:364
Date: 2026-11-14 06:52:21
Message-ID: avgFJdSwQDx7DqaL@bdtpg
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Fri, Nov 13, 2026 at 10:18:34PM -0800, Masahiko Sawada wrote:
> I think the root cause is that commit 788ec96d591 replaced
> found_consistent_snapshot with the check of slotsync_skip_reason, but
> they're not equivalent: found_consistent_snapshot is false unless the
> current cycle synced the slot and found a consistent snapshot, whereas
> slotsync_skip_reason is SS_SKIP_NONE unless the current cycle detected
> a reason to skip. So an alternative idea would be to bring back
> found_consistent_snapshot part from the commit. That way, the decision
> of persisting the slot doesn't depend on the skip_reasons at all.

Yeah, that makes sense to me.

> I've attached a PoC patch.

Thanks! Will look at it early next week.

Regards,

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Henson Choi 2026-11-14 09:16:44 Re: [DEPARSE] Operators on ROW() constructors read back as row comparisons
Previous Message Bertrand Drouvot 2026-11-14 06:41:02 Re: Assertion failure in update_local_synced_slot(), slotsync.c:364