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
dependenton 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
SIinvals 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@sss.pgh.pa.us>
Sent: Thursday, July 15, 2021 1:36 AM
To: Liu, Huailing/刘 怀玲 <liuhuailing@fujitsu.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: SI messages sent when excuting ROLLBACK PREPARED command
"liuhuailing@fujitsu.com" <liuhuailing@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
dependenton the performance of 2PC rollbaxks is Doing It Wrong. But we'd have already done
LocalExecuteInvalidationMessagewhen getting out of the prepared transaction, so no other SI invals should be needed.
regards, tom lane