Correctly init/deinit recovery xact environment.

Simon Riggs <simon@2ndQuadrant.com>

Commit: f4a3e679306ebfbd150d8af3cdd481bea1619c52
Author: Simon Riggs <simon@2ndQuadrant.com>
Date: 2012-11-29T23:46:54Z
Releases: 9.0.11
Correctly init/deinit recovery xact environment.
Previously we performed VirtualXactLockTableInsert
but didn't set MyProc->lxid for Startup process.
pg_locks now correctly shows "1/1" for vxid
of Startup process during Hot Standby.
At end of Hot Standby the Virtual Transaction
was not deleted, leading to problems after
promoting to normal running for some commands,
such as CREATE INDEX CONCURRENTLY.

Files

PathChange+/−
src/backend/storage/ipc/standby.c modified +8 −1
src/backend/storage/lmgr/lmgr.c modified +18 −0
src/include/storage/lmgr.h modified +1 −0