Skip site navigation (1) Skip section navigation (2)

Dealing with prepared transactions in XactCallback

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: pgsql-general(at)postgresql(dot)org
Subject: Dealing with prepared transactions in XactCallback
Date: 2010-06-29 07:33:25
Message-ID: 4C29A1C5.1080904@cybertec.at (view raw or flat)
Thread:
Lists: pgsql-general
Hi,

I need to rework a custom notification scheme that sends TCP
messages about new/modified/deleted records to an external process.
It's obvious that I am using RegisterXactCallback() to do that.
The problem is with prepared transactions. I get XACT_EVENT_PREPARE
in the XactCallback function, where I can save the data to be sent later.
But how can I decide in a later transaction that the application
is doing COMMIT PREPARED for a particular Xid? Does PREPARE
TRANSACTION saves the TopTransactionContext and loads it back fully
so I don't need to worry about saving and reloading?

Thanks in advance,
Zoltán Böszörményi


pgsql-general by date

Next:From: dario.ber@libero.itDate: 2010-06-29 07:37:36
Subject: R: Re: postgres user password: Log on failure
Previous:From: Thomas KellererDate: 2010-06-29 06:20:11
Subject: owner of a database does not own "public" schema?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group