pgsql: Fix race conditions associated with SPGiST redirection tuples.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix race conditions associated with SPGiST redirection tuples.
Дата
Msg-id E1Sx1AH-0008TI-CC@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix race conditions associated with SPGiST redirection tuples.

The correct test for whether a redirection tuple is removable is whether
tuple's xid < RecentGlobalXmin, not OldestXmin; the previous coding
failed to protect index searches being done in concurrent transactions that
have no XID.  This mirrors the recent fix in btree's page recycling logic
made in commit d3abbbebe52eb1e59e621c880ad57df9d40d13f2.

Also, WAL-log the newest XID of any removed redirection tuple on an index
page, and apply ResolveRecoveryConflictWithSnapshot during InHotStandby WAL
replay.  This protects against concurrent Hot Standby transactions possibly
needing to see the redirection tuple(s).

Per my query of 2012-03-12 and subsequent discussion.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/962e0cc71e839c58fb9125fa85511b8bbb8bdbee

Modified Files
--------------
src/backend/access/spgist/spgutils.c  |    1 +
src/backend/access/spgist/spgvacuum.c |   20 +++++++++++---------
src/backend/access/spgist/spgxlog.c   |   17 ++++++++++++++---
src/include/access/spgist_private.h   |    1 +
4 files changed, 27 insertions(+), 12 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Update release notes for libpq feature change.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix race conditions associated with SPGiST redirection tuples.