pgsql: Handle duplicate XIDs in txid_snapshot.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Handle duplicate XIDs in txid_snapshot.
Дата
Msg-id E1Wkxeo-0005ki-5P@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Handle duplicate XIDs in txid_snapshot.

The proc array can contain duplicate XIDs, when a transaction is just being
prepared for two-phase commit. To cope, remove any duplicates in
txid_current_snapshot(). Also ignore duplicates in the input functions, so
that if e.g. you have an old pg_dump file that already contains duplicates,
it will be accepted.

Report and fix by Jan Wieck. Backpatch to all supported versions.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f47e4ce6cea2ced5da35e49d41154a19d7b3ebed

Modified Files
--------------
src/backend/utils/adt/txid.c       |   59 ++++++++++++++++++++++++++++--------
src/test/regress/expected/txid.out |   10 +++---
src/test/regress/sql/txid.sql      |    2 +-
3 files changed, 54 insertions(+), 17 deletions(-)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix race condition in preparing a transaction for two-phase comm
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Handle duplicate XIDs in txid_snapshot.