Re: Removing redundant check for transaction in progress in check_safe_enum_use

2021-07-06 Thread Matthias van de Meent
On Sun, 4 Jul 2021, 03:40 Zhihong Yu, wrote: > > Hi, > I was looking at : > Relax transactional restrictions on ALTER TYPE ... ADD VALUE (redux). > > In check_safe_enum_use(): > > + if (!TransactionIdIsInProgress(xmin) && > + TransactionIdDidCommit(xmin)) > + return; > > Since the

Removing redundant check for transaction in progress in check_safe_enum_use

2021-07-03 Thread Zhihong Yu
Hi, I was looking at : Relax transactional restrictions on ALTER TYPE ... ADD VALUE (redux). In check_safe_enum_use(): + if (!TransactionIdIsInProgress(xmin) && + TransactionIdDidCommit(xmin)) + return; Since the condition would be true only when TransactionIdDidCommit() returns