Re: Avoid retaining conflict-related data when no tables are subscribed

Steven Niu <niushiji@gmail.com>

From: Steven Niu <niushiji@gmail.com>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Nisha Moond <nisha.moond412@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, shveta malik <shveta.malik@gmail.com>
Date: 2025-08-28T05:22:51Z
Lists: pgsql-hackers
Just a typo:

+	 * it seem feasible to skip all phases and directly assign

Should be "it seems".

Regards,
Steven



在 2025/8/28 10:23, Zhijie Hou (Fujitsu) 写道:
> Hi,
> 
> My colleague Nisha reported an issue to me off-list: dead tuples can't
> be removed when retain_dead_tuples is enabled for a subscription with no tables.
> 
> This appears to stem from the inability to advance the non-removable transaction
> ID when AllTablesyncsReady() returns false. Since this function returns false
> when no tables are present, which leads to unnecessary data retention until a
> table is added to the subscription.
> 
> Since dead tuples don't need to be retained when no tables are subscribed, here
> is a patch to fix it, modifying AllTablesyncsReady() to allows no tables to be
> treated as a ready state when explicitly requested.
> 
> Best Regards,
> Hou zj




Commits

  1. Post-commit review fixes for 228c370868.