Re: pg_restore restores privileges differently from psql

Поиск
Список
Период
Сортировка
От Sherrylyn Branchaw
Тема Re: pg_restore restores privileges differently from psql
Дата
Msg-id CAB_myF7+i9Twpx_f5qek-9w=wcT8o+zafVdLARGX_qopJrj1qw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_restore restores privileges differently from psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Yeah, this is a known issue --- the various GRANTs for a specific object
are stored in a single "TOC entry" in the archive, which pg_restore will
send to the server in a single PQexec call, causing them to be effectively
one transaction.  The easiest way to deal with it is to not send
pg_restore's output directly to the target server, but feed it through
psql, something like

        pg_restore  ... | psql [connection parameters]

There's been some discussion of a real fix, but it seems messy.
pg_restore doesn't have a parser that would be adequate to separate
out multiple SQL commands in a TOC entry, and we'd rather not try
to give it one (mainly because of fear of cross-version compatibility
issues).

Okay, thank you. I thought that might be the case: undesirable behavior where the costs outweigh the benefits of fixing. Given that, would it be worth making it more obvious in the pg_restore documentation that pg_restore and its psql output don't always give the same results in the target database?

Best,
Sherrylyn

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

Предыдущее
От: ROS Didier
Дата:
Сообщение: RE: repmgr and SSH
Следующее
От: Rich Shepard
Дата:
Сообщение: Refining query statement