Re: pg_restore COPY error handling

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore COPY error handling
Дата
Msg-id 6274.1138835021@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_restore COPY error handling  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: pg_restore COPY error handling  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Andrew Dunstan wrote:
>> I assume you are referring to this post:
>> http://archives.postgresql.org/pgsql-bugs/2006-01/msg00188.php

> OK, that helps.  The solution is to "not do that", meaning install
> postgis before the restore or something.  Anyway, adding the patch seems
> like too large a risk for a minor release, especially since you are the
> first person to complain about it that I remember.

I don't think you should see this as something specific to PostGIS.
If I interpret Stephen's report properly, any sort of failure during
COPY IN would lead to undesirable behavior in pg_restore.

This is not super surprising because the original design approach for
pg_restore was "bomb out on any sort of difficulty whatsoever".  That
was justly complained about, and now it will try to keep going after
SQL-command errors ... but it sounds like the COPY-data processing
part didn't get fixed properly.

I take no position on whether Stephen's patch is any good --- I haven't
looked at it --- but if he's correct about the problem then I agree it's
a bug fix.  Before deciding whether it deserves to be back-patched, we
at least ought to look closely enough to characterize the situations in
which pg_restore will fail.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_restore COPY error handling
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: pg_restore COPY error handling