Re: 041_checkpoint_at_promote.pl might fail due to race condition on child kill

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 041_checkpoint_at_promote.pl might fail due to race condition on child kill
Date: 2026-10-13 07:17:02
Message-ID: CAHGQGwFtmZAuG+VruhcHWQcmv4=YcQtXLc9jcN3J8JPF_p4o-w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 9, 2026 at 4:00 AM Alexander Lakhin <exclusion(at)gmail(dot)com> wrote:
> Your patch works for me test-wise. The same test loop passed 100+
> iterations successfully. Thank you for paying attention to this!

Thanks for the test!

On second thought, we can simplify the test by waiting for the postmaster to
log "all server processes terminated; reinitializing" instead of using
another backend connection to detect the crash. This ensures that the
postmaster has detected the crash and started restarting. The attached
patch takes this approach. Thoughts?

Regards,

--
Fujii Masao

Attachment Content-Type Size
v2-0001-Fix-crash-restart-race-in-041_checkpoint_at_promo.patch application/octet-stream 3.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou 2026-10-13 07:25:16 Re: Test publication.sql racing with subscription.sql might fail due to cache lookup error
Previous Message Peter Smith 2026-10-13 07:01:01 Re: Proposal: Conflict log history table for Logical Replication