Transaction callback - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Transaction callback
Date
Msg-id bvglqt$20u7$1@news.hub.org
Whole thread Raw
Responses Re: Transaction callback  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I would like to register a "transaction callback" in the backend. Don't
think it's possible today and my question is, how hard would it be to
implement something that would enable this registration?

Ideally, I'd like a "beforeCompletion" that is executed prior to the start
of the commit process and a "afterCompletion" that is called when the
transaction is commited. The latter would have a status flag indicating if
status is "prepared" (to support 2-phase commits), "commited", or "rolled
back".

A related issue is the ability to register a callback that is executed when
the connection is first established. Is that possible today? If so, how do I
register the function to be called?

Regards,

Thomas Hallgren




pgsql-hackers by date:

Previous
From: "Dan Langille"
Date:
Subject: Re: dump + restore didn't include schemas
Next
From: Joe Conway
Date:
Subject: Re: [PATCHES] v7.4.1 text_position() patch