postgresql/src/include/storage
Tom Lane 3e7fdcffd6 Fix WaitLatch() to return promptly when the requested timeout expires.
If the sleep is interrupted by a signal, we must recompute the remaining
time to wait; otherwise, a steady stream of non-wait-terminating interrupts
could delay return from WaitLatch indefinitely.  This has been shown to be
a problem for the autovacuum launcher, and there may well be other places
now or in the future with similar issues.  So we'd better make the function
robust, even though this'll add at least one gettimeofday call per wait.

Back-patch to 9.2.  We might eventually need to fix 9.1 as well, but the
code is quite different there, and the usage of WaitLatch in 9.1 is so
limited that it's not clearly important to do so.

Reported and diagnosed by Jeff Janes, though I rewrote his patch rather
heavily.
2012-11-08 20:04:48 -05:00
..
backendid.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
barrier.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
block.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
buf.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
buf_internals.h Scan the buffer pool just once, not once per fork, during relation drop. 2012-06-07 17:43:11 -04:00
buffile.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
bufmgr.h Scan the buffer pool just once, not once per fork, during relation drop. 2012-06-07 17:43:11 -04:00
bufpage.h Replace XLogRecPtr struct with a 64-bit integer. 2012-06-24 19:19:45 +03:00
copydir.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
fd.h Revert "Use "transient" files for blind writes, take 2". 2012-10-17 12:37:08 -04:00
freespace.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
fsm_internals.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
indexfsm.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
ipc.h Unify calling conventions for postgres/postmaster sub-main functions 2012-06-25 21:30:12 +03:00
item.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
itemid.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
itemptr.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
large_object.h Remove unnecessary overhead in backend's large-object operations. 2012-10-09 16:38:00 -04:00
latch.h Fix WaitLatch() to return promptly when the requested timeout expires. 2012-11-08 20:04:48 -05:00
lmgr.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
lock.h Add a small cache of locks owned by a resource owner in ResourceOwner. 2012-06-21 15:30:26 +03:00
lwlock.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
off.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pg_sema.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pg_shmem.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pmsignal.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pos.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
predicate.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
predicate_internals.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
proc.h Introduce timeout handling framework 2012-07-16 22:55:33 -04:00
procarray.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
procsignal.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
reinit.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
relfilenode.h Improve coding around the fsync request queue. 2012-07-17 16:56:54 -04:00
s_lock.h When LWLOCK_STATS is defined, count spindelays. 2012-06-26 16:06:07 -04:00
shmem.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
sinval.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
sinvaladt.h Tighten up includes in sinvaladt.h, twophase.h, proc.h 2012-06-25 18:40:40 -04:00
smgr.h Close un-owned SMgrRelations at transaction end. 2012-10-17 12:38:21 -04:00
spin.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
standby.h Introduce timeout handling framework 2012-07-16 22:55:33 -04:00