forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit16be973
committed
Don't delay replication for less than recovery_min_apply_delay's resolution.
Recovery delays are implemented by waiting on a latch, and latches takemilliseconds as a parameter. The required amount of waiting was computedusing microsecond resolution though and the wait loop's abort conditionwas checking the delay in microseconds as well. This could lead toshort spurts of busy looping when the overall wait time was below amillisecond, but above 0 microseconds.Instead just formulate the wait loop's abort condition in millisecondgranularity as well. Given that that's recovery_min_apply_delayresolution, 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.de1 parent76d07a2 commit16be973
1 file changed
+2
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5802 | 5802 |
| |
5803 | 5803 |
| |
5804 | 5804 |
| |
5805 |
| - | |
| 5805 | + | |
| 5806 | + | |
5806 | 5807 |
| |
5807 | 5808 |
| |
5808 | 5809 |
| |
|
0 commit comments
Comments
(0)