RE: Fix slot synchronization with two_phase decoding enabled

Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>

From: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, Amit Kapila <amit.kapila16@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Nisha Moond <nisha.moond412@gmail.com>
Date: 2025-04-17T12:46:05Z
Lists: pgsql-hackers
On Thu, Apr 17, 2025 at 8:44 PM Zhijie Hou (Fujitsu) wrote:

> 
> Hi,
> 
> The recently added tests for slotsync on two-phase enabled slots 
> failed[1] due to a broken assertion triggered while decoding the 
> COMMIT PREPARED record on the promoted standby.

Here is the missing link:

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sidewinder&dt=2025-04-09%2010%3A36%3A46

Best Regards,
Hou zj

Commits

  1. Don't retreat slot's confirmed_flush LSN.

  2. Fix assertion failure during decoding from synced slots.

  3. Fix xmin advancement during fast_forward decoding.

  4. Fix slot synchronization for two_phase enabled slots.

  5. Again match pg_user_mappings to information_schema.user_mapping_options.