Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

Поиск
Список
Период
Сортировка
От Damir Belyalov
Тема Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Дата
Msg-id CALH1LguQ5P0uZSYQFy4gJihvV11EkLx+gwxZ-+1DFq1Z6dJqbg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)  (torikoshia <torikoshia@oss.nttdata.com>)
Ответы Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)  (Damir Belyalov <dam.bel07@gmail.com>)
Список pgsql-hackers
Do you mean you stop dealing with errors concerned with constraints and
triggers and we should review 0006-COPY_IGNORE_ERRORS?
Yes, this patch is simpler and I think it's worth adding it first.
 
Hmm, I applied v6 patch and when canceled COPY by sending SIGINT(ctrl +
C), I faced the same situation as below.
I tested it on CentOS 8.4.
Thank you for pointing out this error. it really needs to be taken into account. In the previous  0006 patch, there were 2 stages in one subtransaction - filling the buffer and 'replay mode' (reading from the buffer). Since only NextCopyFrom() is included in PG_TRY(), and the ERRCODE_QUERY_CANCELED error can occur anywhere, it is impossible to catch it and rollback the subtransaction.

I changed the 0006 patch and fixed this error and now only the 'replay buffer filling' is made in the subtransaction.

Patch 0005 (that processed constraints) needs to be finalized, because it requires subtransactions to rollback constraints, triggers. Therefore, it is not possible to fix it yet. There is a decision to put for(;;) loop in PG_TRY. It will solve the problem, but the code will be too complicated.
Вложения

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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Generalize ereport_startup_progress infrastructure
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Avoid memory leaks during base backups