Re: repack: fix a bug to reject deferrable primary key fallback for concurrent mode
Вложения
В списке pgsql-hackers по дате отправления:
| От | Antonin Houska |
|---|---|
| Тема | Re: repack: fix a bug to reject deferrable primary key fallback for concurrent mode |
| Дата | |
| Msg-id | 65564.1776696735@localhost обсуждение |
| Ответ на | repack: fix a bug to reject deferrable primary key fallback for concurrent mode (Chao Li <li.evan.chao@gmail.com>) |
| Ответы |
Re: repack: fix a bug to reject deferrable primary key fallback for concurrent mode
|
| Список | pgsql-hackers |
Chao Li <li.evan.chao@gmail.com> wrote:
> I am continuing to test REPACK, and I found another issue.
>
> In check_concurrent_repack_requirements(), if a table has no replica identity index, the code falls back to using the
primarykey if one exists. The problem is that a deferrable primary key cannot be used for this purpose. WAL generation
doesnot consider a deferrable primary key to be a replica identity, so concurrent mode may not receive enough old tuple
informationto replay concurrent changes.
Thanks for finding it, this is certainly a problem.
I'm just thinking if it's worth a separate error message.
RelationGetIndexList() just ignores the deferrable PK
if (replident == REPLICA_IDENTITY_DEFAULT && OidIsValid(pkeyIndex) && !pkdeferrable)
relation->rd_replidindex = pkeyIndex;
and if there's no other suitable index, the result is that there is no
identity index for the table. So the change attached here should be consistent
with this approach.
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера