OSDN Git Service

Teach standby conflict resolution to use SIGUSR1
authorSimon Riggs <simon@2ndQuadrant.com>
Sat, 16 Jan 2010 10:05:59 +0000 (10:05 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Sat, 16 Jan 2010 10:05:59 +0000 (10:05 +0000)
commita8ce974cddef3957b0615d743a1d090d12e81d50
tree1a7b80c1def4f5719a2d9a223b47e639dcbcb504
parentc9dc53be77664952ebd3b50a1e920e92306484de
Teach standby conflict resolution to use SIGUSR1
Conflict reason is passed through directly to the backend, so we can
take decisions about the effect of the conflict based upon the local
state. No specific changes, as yet, though this prepares for later work.
CancelVirtualTransaction() sends signals while holding ProcArrayLock.
Introduce errdetail_abort() to give message detail explaining that the
abort was caused by conflict processing. Remove CONFLICT_MODE states
in favour of using PROCSIG_RECOVERY_CONFLICT states directly, for clarity.
src/backend/access/transam/xact.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/procsignal.c
src/backend/storage/ipc/standby.c
src/backend/storage/lmgr/proc.c
src/backend/tcop/postgres.c
src/include/storage/proc.h
src/include/storage/procarray.h
src/include/storage/procsignal.h
src/include/storage/standby.h
src/include/tcop/tcopprot.h