From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Invent pre-commit/pre-prepare/pre-subcommit events for xact call |
Date: | 2013-02-15 01:35:18 |
Message-ID: | E1U6ACs-0007R7-ND@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Invent pre-commit/pre-prepare/pre-subcommit events for xact callbacks.
Currently it's only possible for loadable modules to get control during
post-commit cleanup of a transaction. That doesn't work too well if they
want to do something that could throw an error; for example, an FDW might
need to issue a remote commit, which could well fail. To improve matters,
extend the existing APIs for XactCallback and SubXactCallback functions
to provide new pre-commit events for this purpose.
The release notes will need to mention that existing callback functions
should be checked to make sure they don't do something unwanted when one
of the new event types occurs. In the examples within our source tree,
contrib/sepgsql was fine but plpgsql had been a bit too cute.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/fdaf44862beba24c12434d31df556fab25fd3ee7
Modified Files
--------------
src/backend/access/transam/xact.c | 10 +++++++++-
src/include/access/xact.h | 7 +++++--
src/pl/plpgsql/src/pl_exec.c | 26 +++++++++++++-------------
3 files changed, 27 insertions(+), 16 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2013-02-15 02:46:21 | pgsql: pgindent: Fix order in instructions |
Previous Message | Bruce Momjian | 2013-02-14 15:53:07 | pgsql: pg_upgrade: conditionally create cluster delete script |