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_0_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/f1f3bcb7c4d4613246b940e966162130997c84e2
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(-)