| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Use WaitLatch, not pg_usleep, for delaying in pg_sleep(). |
| Date: | 2013-06-15 20:24:19 |
| Message-ID: | E1Unx1H-00034f-HX@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/a64ca63e59c11d8fe6db24eee3d82b61db7c2c83
Modified Files
--------------
src/backend/utils/adt/misc.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2013-06-16 00:39:37 | pgsql: Fix description of archive format which pg_restore -j supports. |
| Previous Message | Fujii Masao | 2013-06-15 20:19:43 | pgsql: Fix pg_restore -l with the directory archive to display the corr |