Buildfarm members olingo and adder reported failures in 031_recovery_conflict.pl where a recovery conflict was counted twice. olingo saw the snapshot conflict count reach 2 instead of 1, while adder saw the same for the buffer pin conflict count. The startup process can signal a standby backend again while it is reporting a recovery-conflict FATAL error. Each processed conflict can increment the corresponding statistic. Thus, even when the expected conflict occurs, its counter can exceed 1. The existing poll for exactly 1 can then time out, and the exact check of the aggregate count can fail as well. Fix this by polling for a positive count for each conflict type and accepting an aggregate count of at least the expected number. Backpatch to v17, where this test was enabled. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com> Reviewed-by: Alexander Lakhin <exclusion@gmail.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/421c0aee-84c8-4c07-b4b9-263095479755%40gmail.com Backpatch-through: 17
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/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/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/.