Re: BUG #1249: pg_restore doesnt handle restoring databases not created as a superuser

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1249: pg_restore doesnt handle restoring databases not created as a superuser
Дата
Msg-id 28667.1094844776@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1249: pg_restore doesnt handle restoring databases not created as a superuser  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
Ответы Re: BUG #1249: pg_restore doesnt handle restoring databases  (Bill Schaub <talon@cosmic-cow.net>)
Список pgsql-bugs
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> When restoring databases with pg_restore with the -C
> option it will connect to template1, set authorization to
> the user that created the database and then reconnect
> as the user that created the database to the new database. this is where the
> trouble starts, from here on
> it trys to set authorization back to the superuser to
> do grant and revoke. this will cause the restore to fail.

Hmm.  This is still broken in CVS tip, but I think the correct solution
is just to replace "\connect db user" with "\connect db" everywhere.
This will retain the starting real user authentication throughout the
restore process.  We have completely abandoned use of \connect to change
authorization, and this seems just an unintentional hangover from the
old way.

            regards, tom lane

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

Предыдущее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1250: compilation fails in src/backend/storage/lmgr/s_lock.c
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1250: compilation fails in src/backend/storage/lmgr/s_lock.c