pgsql: Move call to GetTopTransactionId() earlier in LockAcquire(),

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема pgsql: Move call to GetTopTransactionId() earlier in LockAcquire(),
Дата
Msg-id E1PMsH5-000351-34@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Move call to GetTopTransactionId() earlier in LockAcquire(),
removing an infrequently occurring race condition in Hot Standby.
An xid must be assigned before a lock appears in shared memory,
rather than immediately after, else GetRunningTransactionLocks()
may see InvalidTransactionId, causing assertion failures during
lock processing on standby.

Bug report and diagnosis by Fujii Masao, fix by me.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=09425f89e764beabbdd30cc877b3de96f5d3d2b9

Modified Files
--------------
src/backend/storage/ipc/standby.c |   29 +++++++++++++++++++++--------
src/backend/storage/lmgr/lock.c   |   29 +++++++++++++++++++++--------
src/include/storage/standby.h     |    1 +
3 files changed, 43 insertions(+), 16 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: pgsql: Move call to GetTopTransactionId() earlier in LockAcquire(),
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Fix typo.