summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-09-25 13:29:02 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-09-25 13:29:02 -0400
commitfa42213d4af6bc0dce5b8e9bffeef9afa20b8dd8 (patch)
tree066c230fb1ad229976ac01d2d97aecc79437db99 /src/backend/access/gist/gistxlog.c
parent5f42008f9030db8cdfdc7c9d9dc576d0b0877bcc (diff)
Add minimal sleep to stats isolation test functions.
The functions test_stat_func() and test_stat_func2() had empty function bodies, so that they took very little time to run. This made it possible that on machines with relatively low timer resolution the functions could return before the clock advanced, making the test fail (as seen on buildfarm members fruitcrow and hamerkop). To avoid that, pg_sleep for 10us during the functions. As far as we can tell, all current hardware has clock resolution much less than that. (The current implementation of pg_sleep will round it up to 1ms anyway, but someday that might get improved.) Author: Michael Banck <mbanck@gmx.net> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/68d413a3.a70a0220.24c74c.8be9@mx.google.com Backpatch-through: 15
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions