diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-06-15 16:22:29 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-06-15 16:23:24 -0400 |
commit | a64ca63e59c11d8fe6db24eee3d82b61db7c2c83 (patch) | |
tree | 67b5160d0c6270a221bc78e9639ac406c5541b92 /src/backend/commands/sequence.c | |
parent | f69aece6f475b08a6ec60f80531eefc0005d9e9b (diff) | |
download | postgresql-a64ca63e59c11d8fe6db24eee3d82b61db7c2c83.tar.gz postgresql-a64ca63e59c11d8fe6db24eee3d82b61db7c2c83.zip |
Use WaitLatch, not pg_usleep, for delaying in pg_sleep().
This avoids platform-dependent behavior wherein pg_sleep() might fail to be
interrupted by statement timeout, query cancel, SIGTERM, etc. Also, since
there's no reason to wake up once a second any more, we can reduce the
power consumption of a sleeping backend a tad.
Back-patch to 9.3, since use of SA_RESTART for SIGALRM makes this a bigger
issue than it used to be.
Diffstat (limited to 'src/backend/commands/sequence.c')
0 files changed, 0 insertions, 0 deletions