RE: SI messages sent when excuting ROLLBACK PREPARED command

Поиск
Список
Период
Сортировка
От liuhuailing@fujitsu.com
Тема RE: SI messages sent when excuting ROLLBACK PREPARED command
Дата
Msg-id OSZPR01MB621550603E68B8D506DCA4C4BE129@OSZPR01MB6215.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: SI messages sent when excuting ROLLBACK PREPARED command  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы RE: SI messages sent when excuting ROLLBACK PREPARED command
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: [PATCH] Use optimized single-datum tuplesort in ExecSort
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: row filtering for logical replication