Re: pg_dump schema breakup

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Naz Gassiep <naz(at)mira(dot)net>, Andreas Joseph Krogh <andreak(at)officenet(dot)no>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump schema breakup
Date: 2006-08-18 19:55:13
Message-ID: 44E61B21.9060704@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Andrew Dunstan wrote:
>
>> Joshua D. Drake wrote:
>>
>>>>>> I think what you may really be after is "the stuff that should be
>>>>>> loaded
>>>>>> before inserting data" and "the stuff that should be loaded after",
>>>>>> but
>>>>>> the above are poor names for these concepts.
>>>>>>
>>>>>>
>>>>> But it certainly would be nice to be able to dump all that "stuff":-)
>>>>>
>>>> Yea, I've been told that this would not be a high demand feature. So
>>>> do I have a second vote? ;-)
>>>>
>>> The ability to have a dump that automatically separated the
>>> before-data and after-data objects is definitely
>>> useful. The amount of times I have had to dump the schema and data
>>> separately just so I can modify the
>>> schema before restore, or disable some function that is causing
>>> problems can not even be counted.
>>>
>>>
>> We already have a highly selective and configurable restore mechanism,
>> using the -L feature of pg_restore. Maybe there's a good special case
>> for this particular split, but it is hardly undoable now.
>>
>> As for Naz' needs - I gave him a perl script I whipped up in few minutes
>> to do the split he wanted - and I'm sure you could do the same in python ;-)
>>
>
> Maybe what we need is a program to process the object list from
> pg_restore -L. Or a mode in pg_restore, "from this dump give me all
> the sutff to be loaded before inserting data", and the reverse.
>
> I mean, should the problem be attacked while dumping, or while
> restoring?
>
>

Well, the other issue is how many canned breakup schemes we are going to
support. If this particular one is of sufficiently general usefulness
then I have no objection. But when you can produce it trivially from the
output of "pg_dump -s", the need to hardcode it hardly seems pressing.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-18 20:20:58 Re: pg_dump schema breakup
Previous Message Tom Lane 2006-08-18 19:54:51 Re: libpq Describe Extension [WAS: Bytea and perl]