Forbid finishing a prepared transaction from another database

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Forbid finishing a prepared transaction from another database
Date: 2007-02-13 18:44:56
Message-ID: 45D20728.1090302@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Here's a patch to:

Throw an error if you try to COMMIT/ROLLBACK PREPARED from a database
other than the one where the transaction was originally prepared.

This needs to be fixed because at least NOTIFY/LISTEN gets confused, and
sends the notification to the database where the commit is done, not the
database where the transaction ran originally. And there might be other
places that get confused as well.

It turned out to be even simpler than I imagined. :)

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
error_on_cross_database_finish.patch text/x-patch 979 bytes

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-02-13 19:42:03 Re: Forbid finishing a prepared transaction from another database
Previous Message Tom Lane 2007-02-13 18:19:53 Re: Faster StrNCpy