postgresql/src/backend/port
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
..
aix Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
darwin Remove advertising clause from Berkeley BSD-licensed files, per 2007-03-26 21:44:11 +00:00
dynloader Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
hpux Since HPUX now exists for Itanium, we should decouple the assumption 2003-08-01 19:12:52 +00:00
nextstep Remove remains of old depend target. 2007-01-20 17:16:17 +00:00
sunos4 Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
tas Allow sparcv8plus to use "cas". 2006-05-18 18:51:50 +00:00
win32 Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
ipc_test.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
Makefile Indent comments in makefiles better so they don't appear in the output. 2007-01-07 08:49:31 +00:00
posix_sema.c Change StatementCancelHandler() to check the DoingCommandRead flag to decide 2008-01-26 19:55:08 +00:00
sysv_sema.c Change StatementCancelHandler() to check the DoingCommandRead flag to decide 2008-01-26 19:55:08 +00:00
sysv_shmem.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
win32_sema.c Change StatementCancelHandler() to check the DoingCommandRead flag to decide 2008-01-26 19:55:08 +00:00
win32_shmem.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00