| От | Tom Lane |
|---|---|
| Тема | pg_dumpall --clean is completely broken |
| Дата | |
| Msg-id | 17165.1239459953@sss.pgh.pa.us обсуждение исходный текст |
| Ответы |
Re: pg_dumpall --clean is completely broken
|
| Список | pgsql-hackers |
A thread over in -admin has made me realize the truth of $SUBJECT.
With --clean, pg_dumpall does indeed emit a DROP command for each
role, tablespace, or database ... just before recreating it. This
takes no account of dependencies and so the role and tablespace
drops are pretty much guaranteed to fail due to databases still
depending on them.
I'm not sure if we need any real dependency analysis. It seems
like it would be sufficient to issue the drops in a separate
pass:- drop all the databases- drop all the tablespaces- drop all the roles- go on with creation
The roles might still have references to each other in step 3,
but the DROP ROLE docs claim that's okay (I haven't tested).
Comments?
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера