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 <t...@sss.pgh.pa.us> 
Sent: Thursday, July 15, 2021 1:36 AM
To: Liu, Huailing/刘 怀玲 <liuhuail...@fujitsu.com>
Cc: pgsql-hack...@postgresql.org
Subject: Re: SI messages sent when excuting ROLLBACK PREPARED command

"liuhuail...@fujitsu.com" <liuhuail...@fujitsu.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: twophase.patch
Description: twophase.patch

Reply via email to