Re: XACT_EVENT for 'commit prepared'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Xiaoran Wang <fanfuxiaoran(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XACT_EVENT for 'commit prepared'
Date: 2024-06-07 15:19:40
Message-ID: 1249610.1717773580@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Xiaoran Wang <fanfuxiaoran(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-06-07 15:30:06 Re: PgStat_KindInfo.named_on_disk not required in shared stats
Previous Message Radu Radutiu 2024-06-07 14:28:18 Re: Postgresql OOM