diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2021-03-19 18:12:39 +0100 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2021-03-19 18:12:39 +0100 |
commit | e589c4890b05044a04207c2797e7c8af6693ea5f (patch) | |
tree | bcc8d49a6b03c363c191a9ea3ad09145751959bd /src/backend/access/gist/gistutil.c | |
parent | 27ab1981e7c9b8fcbcb143c5f6f706441a52bbc8 (diff) | |
download | postgresql-e589c4890b05044a04207c2797e7c8af6693ea5f.tar.gz |
Fix race condition in remove_temp_files_after_crash TAP test
The TAP test was written so that it was not waiting for the correct SQL
command, but for output from the preceding one. This resulted in race
conditions, allowing the commands to run in a different order, not block
as expected and so on. This fixes it by inverting the order of commands
where possible, so that observing the output guarantees the data was
inserted properly, and waiting for a lock to appear in pg_locks.
Discussion: https://postgr.es/m/CAH503wDKdYzyq7U-QJqGn%3DGm6XmoK%2B6_6xTJ-Yn5WSvoHLY1Ww%40mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions