On Tue, Oct 11, 2011 at 10:44 AM, Fujii Masao <masao.fu...@gmail.com> wrote: > When I built Streaming Replication and Hot Standby environment, set > max_standby_streaming_delay to 1s and ran the following shell script which > creates the conflict between read-only query and recovery, SEGV occurred on > the standby.
In my investigation, the cause is that VirtualXactLock() doesn't handle correctly the case where BackendIdGetProc() returns NULL when the target backend has already ended. Attached patch will fix this issue. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index a1ce5d8..905502f 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -3675,6 +3675,8 @@ VirtualXactLock(VirtualTransactionId vxid, bool wait) * it's no longer running anywhere. */ proc = BackendIdGetProc(vxid.backendId); + if (proc == NULL) + return true; /* * We must acquire this lock before checking the backendId and lxid
-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs