pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic 4+ messages / 1 participants [nested] [flat]
* pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic @ 2026-10-05 04:04 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Fujii Masao @ 2026-10-05 04:04 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize recovery conflict count checks in 031_recovery_conflict.pl 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/de34b14fcb0168395ca7f1990038f1db06fe1697 Modified Files -------------- src/test/recovery/t/031_recovery_conflict.pl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic @ 2026-10-05 04:04 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Fujii Masao @ 2026-10-05 04:04 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize recovery conflict count checks in 031_recovery_conflict.pl 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 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f7cf724e9c497b6cc143949c98df682dd9605966 Modified Files -------------- src/test/recovery/t/031_recovery_conflict.pl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic @ 2026-10-05 04:05 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Fujii Masao @ 2026-10-05 04:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize recovery conflict count checks in 031_recovery_conflict.pl 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 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8ea5048263c6ef9bd91de8f0ba0857976f94008f Modified Files -------------- src/test/recovery/t/031_recovery_conflict.pl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic @ 2026-10-05 04:05 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Fujii Masao @ 2026-10-05 04:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize recovery conflict count checks in 031_recovery_conflict.pl 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 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/92ee148b64ddc1685b5d0e74d5a083c0b22a6db7 Modified Files -------------- src/test/recovery/t/031_recovery_conflict.pl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-10-05 04:05 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-10-05 04:04 pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic Fujii Masao <fujii@postgresql.org> 2026-10-05 04:04 pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic Fujii Masao <fujii@postgresql.org> 2026-10-05 04:05 pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic Fujii Masao <fujii@postgresql.org> 2026-10-05 04:05 pgsql: Stabilize recovery conflict count checks in 031_recovery_conflic Fujii Masao <fujii@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox