RE: SI messages sent when excuting ROLLBACK PREPARED command - Mailing list pgsql-hackers

From liuhuailing@fujitsu.com
Subject RE: SI messages sent when excuting ROLLBACK PREPARED command
Date
Msg-id OSZPR01MB621550603E68B8D506DCA4C4BE129@OSZPR01MB6215.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: SI messages sent when excuting ROLLBACK PREPARED command  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses RE: SI messages sent when excuting ROLLBACK PREPARED command  ("liuhuailing@fujitsu.com" <liuhuailing@fujitsu.com>)
List 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
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

Attachment

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: [PATCH] Use optimized single-datum tuplesort in ExecSort
Next
From: Dilip Kumar
Date:
Subject: Re: row filtering for logical replication