Re: Remove some unnecessary if-condition

2020-10-14 Thread Michael Paquier
On Mon, Oct 12, 2020 at 11:42:31AM +, Hou, Zhijie wrote: > Thank you for reviewing! added it to commitfest > https://commitfest.postgresql.org/30/2760/ - if (!bootstrap) - { - pgstat_bestart(); - CommitTransactionCommand(); - } + pgstat_bestart(); +

RE: Remove some unnecessary if-condition

2020-10-12 Thread Hou, Zhijie
> To me it looks good to clean up the conditions as you have done in the patch. > Please add this to commitfest so that it's not forgotten. I have verified > the code and indeed the conditions you are removing are unnecessary. So > the patch can be marked as CFP right away. Thank you for reviewing

Re: Remove some unnecessary if-condition

2020-10-12 Thread Ashutosh Bapat
On Fri, Oct 9, 2020 at 6:29 AM Hou, Zhijie wrote: > > Hi > > I found some likely unnecessary if-condition in code. > > 1. Some check in else branch seems unnecessary. > > In (/src/backend/replication/logical/reorderbuffer.c) > ① @@ -4068,7 +4068,7 @@ ReorderBufferToastAppendChunk(ReorderBuffer *rb

Remove some unnecessary if-condition

2020-10-08 Thread Hou, Zhijie
Hi I found some likely unnecessary if-condition in code. 1. Some check in else branch seems unnecessary. In (/src/backend/replication/logical/reorderbuffer.c) ① @@ -4068,7 +4068,7 @@ ReorderBufferToastAppendChunk(ReorderBuffer *rb, ReorderBufferTXN *txn, > bool   found; > if (!found) > { >