RE: SI messages sent when excuting ROLLBACK PREPARED command

From: "liuhuailing(at)fujitsu(dot)com" <liuhuailing(at)fujitsu(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: SI messages sent when excuting ROLLBACK PREPARED command
Date: 2021-07-15 03:04:31
Message-ID: OSZPR01MB621550603E68B8D506DCA4C4BE129@OSZPR01MB6215.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, tom

Thanks for your reply.

>Hmmm, yeah, I think you're right. It probably doesn't make a big difference in the real world --- anyone who's dependent on the performance of 2PC rollbaxks is Doing It Wrong.
> But we'd have already done LocalExecuteInvalidationMessage when getting out of the prepared transaction, so no other SI invals should be needed.
Yes, it does not make any error.

But for the beginner, when understanding the code, it may make confused.
And for the developer, when developing based on this code, it may make unnecessary handling added.

So, I think it is better to optimize the code.

Here is the patch.

Regards, liuhl

-----Original Message-----
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Thursday, July 15, 2021 1:36 AM
To: Liu, Huailing/刘 怀玲 <liuhuailing(at)fujitsu(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SI messages sent when excuting ROLLBACK PREPARED command

"liuhuailing(at)fujitsu(dot)com" <liuhuailing(at)fujitsu(dot)com> writes:
> So, I think we needn't send SI messags when rollbacking the two-phase transaction.
> Or Does it has something special because of two-phase transaction?

Hmmm, yeah, I think you're right. It probably doesn't make a big difference in the real world --- anyone who's dependent on the performance of 2PC rollbaxks is Doing It Wrong. But we'd have already done LocalExecuteInvalidationMessage when getting out of the prepared transaction, so no other SI invals should be needed.

regards, tom lane

Attachment Content-Type Size
twophase.patch application/octet-stream 950 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-07-15 04:07:53 Re: row filtering for logical replication
Previous Message Ranier Vilela 2021-07-15 02:55:04 Re: [PATCH] Use optimized single-datum tuplesort in ExecSort