Correctly init/deinit recovery xact environment.
Simon Riggs <simon@2ndQuadrant.com>
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
| Path | Change | +/− |
|---|---|---|
| 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 |