pgarchives: Bug report + Patches: loader can't handle message in multiple lists

Поиск
Список
Период
Сортировка
От Célestin Matte
Тема pgarchives: Bug report + Patches: loader can't handle message in multiple lists
Дата
Msg-id ed72a307-e40f-98b9-d08a-e5bf331525ae@cmatte.me
обсуждение исходный текст
Ответы Re: pgarchives: Bug report + Patches: loader can't handle message in multiple lists
Список pgsql-www
The messages loader from pgarchives may crash when importing 2 mailing lists with messages in common. In another word:
importingscript will fail when importing list1 and list2 if a message to list1 has list2 in CC:.
 

I attach a patch (0001-loader-attempt-to-handle-message-in-multiple-lists.patch) that starts addressing the issue, but
doesnot fully fixes it, as the script can later crash (in storage.py line 234) because a message cannot be imported
twice.Fixing this would require changing the way messages are stored in the database, using (messageid, listid) as a
primarykey instead of messageid, or allowing a message to belong to several threads using message_thread table instead
ofa threadid column in messages.
 
This patch is only for discussion.

I also attach patch 0001-load_message-catch-postgres-UniqueViolation-errors-w.patch as a workaround to this issue, to
catchand log such errors and keep importing an mbox without crashing when it happens (message will then only appear in
thefirst imported list).
 
This patch can be used/applied.
-- 
Célestin Matte
Вложения

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

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: missing files because versioning?
Следующее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: Doc: Rework contrib appendix -- informative titles, tweaked sentences