Re: Unhappy thoughts about pg_dump and objects inherited from template1

Поиск
Список
Период
Сортировка
От selkovjr@mcs.anl.gov
Тема Re: Unhappy thoughts about pg_dump and objects inherited from template1
Дата
Msg-id 200011100459.WAA16948@selkovjr.xnet.com
обсуждение исходный текст
Ответ на Re: Unhappy thoughts about pg_dump and objects inherited from template1  (Jan Wieck <janwieck@Yahoo.com>)
Список pgsql-hackers
Jan Wieck wrote:
> Tom Lane wrote:
> > Philip Warner <pjw@rhyme.com.au> writes:
> > > Where would you store the value if not in pg_database?
> >
> > No other ideas at the moment.  I was just wondering whether there was any
> > way to delete it entirely, but seems like we want to have the value for
> > template0 available.  The old way of hardwiring knowledge into pg_dump
> > was definitely not as good.
> 
>     To  make  pg_dump  failsafe,  we'd  IMHO  need  to freeze all
>     objects that come with template0 copying.

Here's another (somewhat) unhappy thought: what if there are objects
in template1 or other databases that one doesn't want to dump or
restore?

This is very much the case for user-defined types that usually consist
of multiple dozens of components. Currently, pg_dump picks them up
based on their oid, whether or not they are sitting in template1, and
dumps them in a non-restorable and non-portable manner along with the
user data. Consequently, I have to write filters to pluck the type
code out from the dump. The filters are ugly, unreliable and have to
be maintained in sync with the types. 

Picture this, though: if int and float where user-defined types --
would anyone be happy seeing them in every dump? Or, even worse,
responding to "object already exists" kind of problems during restore?

Not that I couldn't get by like this; but since everybody seems
unhappy too, maybe it's a good moment to consider a special 'dump'
attribute for every object in the schema? The attribute could be
looked at by dump and restore tools and set by whatever rules one may
find appropriate.

--Gene


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

Предыдущее
От: Alfred Perlstein
Дата:
Сообщение: Re: 7.0.2 dies when connection dropped mid-transaction
Следующее
От: selkovjr@mcs.anl.gov
Дата:
Сообщение: Re: Unhappy thoughts about pg_dump and objects inherited from template1