Обсуждение: Re: [INTERFACES] postgresql 7.3 versus 7.2

Поиск
Список
Период
Сортировка

Re: [INTERFACES] postgresql 7.3 versus 7.2

От
Robert Treat
Дата:
On Wed, 2003-02-12 at 16:02, Ulf Rehmann wrote:
> 
> Hi!
> 
> Is there any way to adjust dumps from postgresql 7.3 for use by
> version 7.2 and vice versa ?
> 
> Or is there a way to transport a full database via csv or in any other
> kind to 7.2 and vice versa ?
> 
> We are running a couple of servers/mirrors at various locations in the
> world, handling data based on postgresql, and now we have trouble to
> transport data from and to sites with different versions.
> 

Create a schema only dump with the 7.2 pg_dump. 
Create a data only dump (possibly with INSERT output) with the 7.3
pg_dump. Assuming you haven't done anything too wacky, you should be
able to drop your 7.2 database, reload the 7.2 schema, then load up the
7.3 data. As always, test this out before doing it on a production
system.

Robert Treat







Re: [INTERFACES] postgresql 7.3 versus 7.2

От
Tom Lane
Дата:
Robert Treat <xzilla@users.sourceforge.net> writes:
> On Wed, 2003-02-12 at 16:02, Ulf Rehmann wrote:
>> Is there any way to adjust dumps from postgresql 7.3 for use by
>> version 7.2 and vice versa ?

> Create a schema only dump with the 7.2 pg_dump. 
> Create a data only dump (possibly with INSERT output) with the 7.3
> pg_dump. Assuming you haven't done anything too wacky, you should be
> able to drop your 7.2 database, reload the 7.2 schema, then load up the
> 7.3 data. As always, test this out before doing it on a production
> system.

I think he'll have trouble even with that :-( ... 7.3 pg_dump will try
to use column-name-list syntax in its COPY commands, which the 7.2
server won't like.

AFAICS the only answer is to run the data dump through a filter (sed or
perl or whatever) to edit the COPY commands to a format 7.2 will take.
        regards, tom lane


Re: [INTERFACES] postgresql 7.3 versus 7.2

От
Neil Conway
Дата:
On Thu, 2003-02-13 at 10:42, Tom Lane wrote:
> I think he'll have trouble even with that :-( ... 7.3 pg_dump will try
> to use column-name-list syntax in its COPY commands, which the 7.2
> server won't like.

If you used an insert-only, data-only dump, that might work...

Cheers,

Neil
-- 
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC





Re: [INTERFACES] postgresql 7.3 versus 7.2

От
Ulf Rehmann
Дата:
| Create a schema only dump with the 7.2 pg_dump. | Create a data only dump (possibly with INSERT output) with the 7.3|
pg_dump.Assuming you haven't done anything too wacky, you should be| able to drop your 7.2 database, reload the 7.2
schema,then load up the| 7.3 data. As always, test this out before doing it on a production| system.| 
 

Thanks a lot for this quick explanation, this is very helpful!
By the way, is there a possibility to just do incremental
dumps/restores? Say, since a given date?

Ulf