Re: Non-text mode for pg_dumpall
От | Robert Haas |
---|---|
Тема | Re: Non-text mode for pg_dumpall |
Дата | |
Msg-id | CA+TgmoaQShT2QAOCE2Tj=JGWbfBKhSmzqRqGMbiog6Uy8gsADQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Non-text mode for pg_dumpall (Mahendra Singh Thalor <mahi6run@gmail.com>) |
Список | pgsql-hackers |
On Wed, Jul 9, 2025 at 2:51 PM Mahendra Singh Thalor <mahi6run@gmail.com> wrote: > > This drops all databases: > > > > pg_dumpall --clean -Fd -f /tmp/dump > > pg_restore -d template1 --globals-only /tmp/dump > > > > That didn't match my expectations given this help text: > > > > $ pg_restore --help|grep global > > -g, --globals-only restore only global objects, no databases > > Databases are global objects so due to --clean command, we are putting > drop commands in global.dat for all the databases. While restoring, we > used the "--globals-only" option so we are dropping all these > databases by global.dat file. > > Please let us know your expectations for this specific case. I am not sure whether pg_dumpall --clean should ever drop databases, but it certainly shouldn't do it with --globals-only. In that case, it's not restoring the databases, so dropping them seems catastrophically bad. -- Robert Haas EDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: