postgres-github.git / summary / log / commit / refs

commit    3284e3f63cf0b42a1c89bb547778754d72aac9e4
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Tue Apr 07 04:17:13 2026 +0000

    Fix injection point detach timing problem in TAP test for lock stats
    
    injection_points_detach() could fail because of a concurrent cleanup
    triggered by injection_points_set_local() when a session finishes.
    This problem could be reproduced by adding a hardcoded sleep in
    InjectionPointDetach(), and has been detected by the CI.
    
    As the test is designed so as the injection point is detached before
    being awaken, there is no need for it to be local, similarly to test
    010_index_concurrently_upsert.  This commit removes
    injection_points_set_local(), replacing it with a confirmation that the
    point has been attached in the session expected to block on a lock.
    With this removal, the detach cannot happen concurrently anymore, only
    before when the point is woken up.
    
    Issue introduced by 557a9f1e3e62, where the test has been added.
    
    Reported-by: Andres Freund <andres@anarazel.de>
    Discussion: https://postgr.es/m/rp6wz4lnz5qn4zlh7uxtavzfrmqvycy2g42z4zasfss2gxi54f@zzcsjdvdflwp

[parent: 17132f55c5a2]