postgresql/src/include/storage
Tom Lane 6322e84430 Change StatementCancelHandler() to check the DoingCommandRead flag to decide
whether to execute an immediate interrupt, rather than testing whether
LockWaitCancel() cancelled a lock wait.  The old way misclassified the case
where we were blocked in ProcWaitForSignal(), and arguably would misclassify
any other future additions of new ImmediateInterruptOK states too.  This
allows reverting the old kluge that gave LockWaitCancel() a return value,
since no callers care anymore.  Improve comments in the various
implementations of PGSemaphoreLock() to explain that on some platforms, the
assumption that semop() exits after a signal is wrong, and so we must ensure
that the signal handler itself throws elog if we want cancel or die interrupts
to be effective.  Per testing related to bug #3883, though this patch doesn't
solve those problems fully.

Perhaps this change should be back-patched, but since pre-8.3 branches aren't
really relying on autovacuum to respond to SIGINT, it doesn't seem critical
for them.
2008-01-26 19:55:08 +00:00
..
backendid.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
block.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
buf.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
buf_internals.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
buffile.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
bufmgr.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
bufpage.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
fd.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
freespace.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
ipc.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
item.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
itemid.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
itempos.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
itemptr.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
large_object.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
lmgr.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
lock.h lmgr.c:DescribeLockTag was never taught about virtual xids, per Greg Stark. 2008-01-08 23:18:51 +00:00
lwlock.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
off.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
pg_sema.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
pg_shmem.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
pmsignal.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
pos.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
proc.h Change StatementCancelHandler() to check the DoingCommandRead flag to decide 2008-01-26 19:55:08 +00:00
procarray.h Fix CREATE INDEX CONCURRENTLY to not deadlock against an automatic or manual 2008-01-09 21:52:36 +00:00
relfilenode.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
s_lock.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
shmem.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
sinval.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
sinvaladt.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
smgr.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
spin.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00