pg_stash_advice: Fix race conditions in 001_persist.pl

Each time we start the server, there's a brief lockout while the
persistence worker reloads stashes from disk. Until that's complete,
no stashes will be visible and no stash modifications can be made.
This test case failed to take that into account, and could therefore
fail spuriously.

Reported-by: Alexander Lakhin <[email protected]>
Reported-by: Nik Samokhvalov <[email protected]>
Author: Nik Samokhvalov <[email protected]>
Co-authored-by: Robert Haas <[email protected]> (whitespace changes)
Backpatch-through: 19
Discussion: 
http://postgr.es/m/CAM527d8PqdbDy=putlybjm8-fvvfdr2blcyfyzhw6oi9rxb...@mail.gmail.com

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/dccaf9d1e4fe8552134ec322ae93454efeb17b1b

Modified Files
--------------
contrib/pg_stash_advice/t/001_persist.pl | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)

Reply via email to