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
обсуждение исходный текст
Ответы Re: Removing redundant check for transaction in progress in check_safe_enum_use
Список pgsql-hackers
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 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
Дата:
Сообщение: Re: Reducing the cycle time for CLOBBER_CACHE_ALWAYS buildfarm members
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: pgbench using COPY FREEZE