Reset snapshot export state on the transaction abort

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Reset snapshot export state on the transaction abort
Date: 2021-10-11 15:16:32
Message-ID: CAFiTN-s0zA1Kj0ozGHwkYkHwa5U0zUE94RSc_g81WrpcETB5=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As reported at [1], if the transaction is aborted during export
snapshot then ExportInProgress and SavedResourceOwnerDuringExport are
not getting reset and that is throwing an error
"clearing exported snapshot in wrong transaction state" while
executing the next command. The attached patch clears this state if
the transaction is aborted.

[1] https://www.postgresql.org/message-id/CAFiTN-tqopqpfS6HHug2nnOGieJJ_nm-Nvy0WBZ=Zpo-LqtSJA@mail.gmail.com

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v1-0001-Reset-snapshot-export-state-during-abort.patch text/x-patch 2.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message PG Bug reporting form 2021-10-11 15:25:49 BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable
Previous Message Isaac Morland 2021-10-11 15:15:10 Re: Proposal: allow database-specific role memberships