Re: Backup strategy

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Backup strategy
Дата
Msg-id CAKFQuwbXWNyT0zyZG7iL1wNLQUPitTJ89z6WAsWbmqJZXiA_6Q@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Backup strategy  (David Barron <david.barron@zencos.com>)
Список pgsql-admin


On Wed, Feb 28, 2024, 09:45 David Barron <david.barron@zencos.com> wrote:

If, for example, table a has a constraint that references rows in table b, table b has to be restored first, but pg_dump doesn't take that into account.  So the restore tries to restore table a first, but can't because table b contains no data.  That's what I ran into in general terms.

It is illegal to write a check constraint that references another table.  It doesn't matter that hiding your illegal setup inside a back box function prevents the system from stopping you.  You need to fix your design so as not to break the documented rules.  Namely by using a trigger.

David J.

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Backup strategy
Следующее
От: David Barron
Дата:
Сообщение: RE: Backup strategy