From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Handle duplicate XIDs in txid_snapshot. |
Date: | 2014-05-15 15:33:18 |
Message-ID: | E1Wkxeo-0005kd-2w@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/19d7e8f07abf6b3a2e3d7c0c9c51041dfaac0ad6
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2014-05-15 16:48:39 | pgsql: Fix a couple of bugs in pg_recvlogical output to stdout. |
Previous Message | Heikki Linnakangas | 2014-05-15 15:33:17 | pgsql: Handle duplicate XIDs in txid_snapshot. |