Re: [Retrieved]RE: backup and recovery

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [Retrieved]RE: backup and recovery
Дата
Msg-id 200403241815.i2OIFJS02678@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [Retrieved]RE: backup and recovery  (Tsirkin Evgeny <tsurkin@mail.jct.ac.il>)
Ответы Re: [Retrieved]RE: backup and recovery
Список pgsql-admin
Tsirkin Evgeny wrote:
> > Uh, you just ask and we discuss it on the list.
> >
> > Are you using INSERTs from pg_dump?  I assume so because COPY uses a
> > single transaction per command.  Right now with pg_dump -d I see:
> >
> >     --
> >     -- Data for Name: has_oids; Type: TABLE DATA; Schema: public; Owner:
> >     postgres
> >     --
> >
> >     INSERT INTO has_oids VALUES (1);
> >     INSERT INTO has_oids VALUES (1);
> >     INSERT INTO has_oids VALUES (1);
> >     INSERT INTO has_oids VALUES (1);
> >
> > Seems that should be inside a BEGIN/COMMIT for performance reasons, and
> > to have the same behavior as COPY (fail if any row fails).  Commands?
> >
> > As far as skipping on errors, I am unsure on that one, and if we put the
> > INSERTs in a transaction, we will have no way of rolling back only the
> > few inserts that fail.
> >
> That is right but there are sutuation when you prefer at least some
> data to be inserted and not all changes to be ralled back because
> of errors.

Added to TODO:

    * Have pg_dump use multi-statement transactions for INSERT dumps

For simple performance reasons, it would be good.  I am not sure about
allowing errors to continue loading.   Anyone else?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: Tsirkin Evgeny
Дата:
Сообщение: Re: [Retrieved]RE: backup and recovery
Следующее
От: Naomi Walker
Дата:
Сообщение: Re: [Retrieved]RE: backup and recovery