aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-03-23 16:40:10 +0100
committerAndres Freund <andres@anarazel.de>2015-03-23 16:51:11 +0100
commit87cec51d3ad1107f6f224ed7d773e70c8896e4c0 (patch)
treee1e69d1788f294098fada3224275e2ccb40d00d5 /src/backend/access/gist
parenta1105c3dd44c1fb76eb62a708f0421f21b9dde9b (diff)
downloadpostgresql-87cec51d3ad1107f6f224ed7d773e70c8896e4c0.tar.gz
postgresql-87cec51d3ad1107f6f224ed7d773e70c8896e4c0.zip
Don't delay replication for less than recovery_min_apply_delay's resolution.
Recovery delays are implemented by waiting on a latch, and latches take milliseconds as a parameter. The required amount of waiting was computed using microsecond resolution though and the wait loop's abort condition was checking the delay in microseconds as well. This could lead to short spurts of busy looping when the overall wait time was below a millisecond, but above 0 microseconds. Instead just formulate the wait loop's abort condition in millisecond granularity as well. Given that that's recovery_min_apply_delay resolution, it seems harmless to not wait for less than a millisecond. Backpatch to 9.4 where recovery_min_apply_delay was introduced. Discussion: 20150323141819.GH26995@alap3.anarazel.de
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions