Re: ON CONFLICT DO NOTHING on pg_dump

Поиск
Список
Период
Сортировка
От Nico Williams
Тема Re: ON CONFLICT DO NOTHING on pg_dump
Дата
Msg-id 20180612160836.GD23356@localhost
обсуждение исходный текст
Ответ на RE: ON CONFLICT DO NOTHING on pg_dump  ("Ideriha, Takeshi" <ideriha.takeshi@jp.fujitsu.com>)
Ответы RE: ON CONFLICT DO NOTHING on pg_dump  ("Ideriha, Takeshi" <ideriha.takeshi@jp.fujitsu.com>)
Список pgsql-hackers
On Tue, Jun 12, 2018 at 09:05:23AM +0000, Ideriha, Takeshi wrote:
> >From: Surafel Temesgen [mailto:surafel3000@gmail.com] 
> >Subject: ON CONFLICT DO NOTHING on pg_dump
> 
> >Sometimes I have to maintain two similar database and I have to update one from the other and notice having the
optionto add ON CONFLICT DO NOTHING clause to >INSERT command in the dump data will allows pg_restore to be done with
freeof ignore error.
 
> 
> Hi,
> I feel like that on-conflict-do-nothing support is useful especially coupled with --data-only option.
> Only the difference of data can be restored.

But that's additive-only.  Only missing rows are restored this way, and
differences are not addressed.

If you want restore to restore data properly and concurrently (as
opposed to renaming a new database into place or whatever) then you'd
want a) MERGE, b) dump to generate MERGE statements.  A concurrent data
restore operation would be rather neat.

Nico
-- 


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: why partition pruning doesn't work?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: late binding of shared libs for C functions