The slot synchronization failed because the local slot's (created during slot synchronization) catalog_xmin on standby is ahead of remote slot. This happens because the INSERT before slot synchronization results in the generation of a new xid that could be replicated to the standby. Now before the xmin of the physical slot on the primary catches up via hot_standby_feedback, the test has created a logical slot that got some prior value of catalog_xmin. To fix this we could try to ensure that the physical slot's catalog_xmin is caught up to latest value before creating a logical slot but we took a simpler path to move the INSERT after synchronizing the logical slot. Reported-by: Alexander Lakhin as per buildfarm Diagnosed-by: Amit Kapila, Hou Zhijie, Alexander Lakhin Author: Hou Zhijie Backpatch-through: 17 Discussion: https://postgr.es/m/bde6ac67-69cc-c104-5ab6-dd4f5deadf24@gmail.com
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/17/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/17/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.