Re: Practical error logging for very large COPY statements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Practical error logging for very large COPY statements
Дата
Msg-id 6022.1132617922@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Practical error logging for very large COPY statements  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Practical error logging for very large COPY statements  (Andrew Dunstan <andrew@dunslane.net>)
Re: Practical error logging for very large COPY  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> What I'd like to do is add an ERRORTABLE clause to COPY. The main
> problem is how we detect a duplicate row violation, yet prevent it from
> aborting the transaction.

If this only solves the problem of duplicate keys, and not any other
kind of COPY error, it's not going to be much of an advance.

> Flow of control would be to:

>     locate page of index where value should go
>     lock index block
>     _bt_check_unique, but don't error
>         if violation then insert row into ERRORTABLE
>     else
>         insert row into data block
>         insert row into unique index
>         unlock index block
>         do other indexes

Ugh.  Do you realize how many levels of modularity violation are implied
by that sketch?  Have you even thought about the fact that we have more
than one kind of index?
        regards, tom lane


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Using FSM to trigger vacuum
Следующее
От: Gregory Maxwell
Дата:
Сообщение: Re: Improving count(*)