Comment on extension issues with pg_dump after upgrading to 9.1.2

Поиск
Список
Период
Сортировка
От Timothy Garnett
Тема Comment on extension issues with pg_dump after upgrading to 9.1.2
Дата
Msg-id CAPcyiQ0fas+4QsgDbXSFK5LsJTN3ORB=Ua3KyND5U-Ore_BTLw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Comment on extension issues with pg_dump after upgrading to 9.1.2  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-general
Hi All,

We recently upgraded to 9.1.2 from 9.0.3 and ran into some issues with the process we've been using to dump and restore databases.  We typically use a super user (but not the postgres user) to dump and restore databases, but in moving the 9.1.2 we've run into trouble with pg_dump outputing comment on extension lines that cause permission issues on pg_restore.

Something like:
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
COMMENT ON EXTENSION plpgsql IS '....';

The create is fine because the extension is already in the template db, but the comment causes problems because the extension is owned by the postgres user, but we're trying to use a different user (and apparently even super users can not comment on extensions owned by other users).  This happens even if the comment isn't changing.  There also appears to be no way to change the ownership of an extension.  We have the same issue with other extensions.  So far we've worked around it by setting the comment to NULL in the template and all other databases (in which case pg_dump doesn't output the comment line), but I was wondering if there was an easy way to keep the comments.

Tim

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

Предыдущее
От: Kiriakos Georgiou
Дата:
Сообщение: Re: Counting different strings (OK%, FB%) in same table, grouped by week number
Следующее
От:
Дата:
Сообщение: Problem when reinstall postgresql value pg_config not update!!