Re: XACT_EVENT for 'commit prepared' - Mailing list pgsql-hackers

From Tom Lane
Subject Re: XACT_EVENT for 'commit prepared'
Date
Msg-id 1249610.1717773580@sss.pgh.pa.us
Whole thread Raw
In response to XACT_EVENT for 'commit prepared'  (Xiaoran Wang <fanfuxiaoran@gmail.com>)
Responses Re: XACT_EVENT for 'commit prepared'
List pgsql-hackers
Xiaoran Wang <fanfuxiaoran@gmail.com> writes:
> I found that in enum XactEvent, there is  'XACT_EVENT_PREPARE'  for
> 'prepare transaction', but there is no event for 'commit prepared' or
> 'rollback prepared'.

On the whole, it seems like a good idea to me that those commands
don't invoke event triggers.  It is a core principle of 2PC that
if 'prepare' succeeded, 'commit prepared' must not fail.  Invoking a
trigger during the second step would add failure cases and I'm not
sure what value it has.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Radu Radutiu
Date:
Subject: Re: Postgresql OOM
Next
From: Andres Freund
Date:
Subject: Re: PgStat_KindInfo.named_on_disk not required in shared stats