Removing redundant check for transaction in progress in check_safe_enum_use
От
Zhihong Yu
Тема
Removing redundant check for transaction in progress in check_safe_enum_use
Дата
Msg-id
CALNJ-vS5iANLVWb62=Com4UUU+7aZOUd7MKgR-jQPDRocjsVJA@mail.gmail.com
Список
Дерево обсуждения
Removing redundant check for transaction in progress in check_safe_enum_use Zhihong Yu <zyu@yugabyte.com>
Re: Removing redundant check for transaction in progress in check_safe_enum_use Matthias van de Meent <boekewurm+postgres@gmail.com>
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;
+ TransactionIdDidCommit(xmin))
+ return;
Since the condition would be true only when TransactionIdDidCommit() returns true, I think the call to TransactionIdIsInProgress is not needed.
If transaction for xmin is committed, the transaction cannot be in progress at the same time.
Please see the simple patch for removing the redundant check.
Thanks
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата: