diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2021-03-19 02:05:23 +0100 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2021-03-19 02:17:13 +0100 |
commit | a16b2b960f0eec2fe367e86017b3c24ed688ba2b (patch) | |
tree | bca6e92eb654de041ee8a77abee69bafb527bc56 /src/backend/access/gist/gist.c | |
parent | 5b2266e33fc74142d23685bdf54f64ad598fbdea (diff) | |
download | postgresql-a16b2b960f0eec2fe367e86017b3c24ed688ba2b.tar.gz postgresql-a16b2b960f0eec2fe367e86017b3c24ed688ba2b.zip |
Fix TAP test for remove_temp_files_after_crash
The test included in cd91de0d17 had two simple flaws.
Firstly, the number of rows was low and on some platforms (e.g. 32-bit)
the sort did not require on-disk sort, so on those machines it was not
testing the automatic removal. The test was however failing, because
without any temporary files the base/pgsql_tmp directory was not even
created. Fixed by increasing the rowcount to 5000, which should be high
engough on any platform.
Secondly, the test used a simple sleep to wait for the temporary file to
be created. This is obviously problematic, because on slow machines (or
with valgrind, CLOBBER_CACHE_ALWAYS etc.) it may take a while to create
the temporary file. But we also want the tests run reasonably fast.
Fixed by instead relying on a UNIQUE constraint, blocking the query that
created the temporary file.
Author: Euler Taveira
Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/CAH503wDKdYzyq7U-QJqGn%3DGm6XmoK%2B6_6xTJ-Yn5WSvoHLY1Ww%40mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions