Re:BUG #18280: logical decoding build wrong snapshot for subtransactions

Поиск
Список
Период
Сортировка
От feichanghong
Тема Re:BUG #18280: logical decoding build wrong snapshot for subtransactions
Дата
Msg-id tencent_0726471CA7087C4AC6EF1F19409DF11FCF08@qq.com
обсуждение исходный текст
Ответ на BUG #18280: logical decoding build wrong snapshot for subtransactions  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #18280: logical decoding build wrong snapshot for subtransactions
Re: BUG #18280: logical decoding build wrong snapshot for subtransactions
Список pgsql-bugs
> SnapBuildXidSetCatalogChanges (introduced in 272248a) skipping the check for
> the sub-transactions when the parent transaction has been marked as
> containing catalog changes should be the root cause of the problem.

My fix is to remove the ReorderBufferXidHasCatalogChanges condition from the SnapBuildXidSetCatalogChanges function. This approach has a false positive; the subtransactions that didn't change catalog to the snapshot are also added to the commit list. But that won't be a problem since we use snapshot built during decoding only to read system catalogs, as 272248a's commit message says.


The attached patch has been verified to resolve the mentioned issue.

Best regards.


Alibaba Cloud Computing Ltd.
Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18281: Superuser can rename the schema with the prefix "pg_" (Applies to all versions of postgresql)
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #18281: Superuser can rename the schema with the prefix "pg_" (Applies to all versions of postgresql)