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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/884aca9b96989b9bc1b65d42e731e90f098ee2ee

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

Reply via email to