Thread: How export from 8.2.4 down to 8.1.8

How export from 8.2.4 down to 8.1.8

From
Andreas
Date:
Hi,

I'll have to export from 8.2.4 down to 8.1.8 because our provider runs
Debian Sarge and can't offer a newer PG.
I tried to pg_dump a plain-text backup an run it through 8.1.8's psql.
That failed because of syntax errors.
Same with compressed backup even when I let my local 8.2.4 pg_dump send
the data to the remote server.

How would I get the stuff transfered?

By the way ... my local database is UTF-8 and the PG of Debian Sarge is
LATIN9


Re: How export from 8.2.4 down to 8.1.8

From
Tom Lane
Date:
Andreas <maps.on@gmx.net> writes:
> I'll have to export from 8.2.4 down to 8.1.8 because our provider runs
> Debian Sarge and can't offer a newer PG.
> I tried to pg_dump a plain-text backup an run it through 8.1.8's psql.
> That failed because of syntax errors.

In general the only answer to this type of situation is hand editing of
the dump file to deal with any syntax additions.  For this particular
combination of versions, however, some experimentation suggests that you
can get away with using 8.1's pg_dump to extract data from the 8.2
server (you'll have to give it the -i option).  You might have a bit of
difficulty with custom aggregates, but in a quick test I didn't see
anyplace else where 8.1 pg_dump failed to cope with the 8.2 system
catalogs.

But having said that ... I'm pretty sure your provider could run 8.2
if he wanted to.  Doesn't Debian offer backports?

            regards, tom lane

Re: How export from 8.2.4 down to 8.1.8

From
Andreas
Date:
Tom Lane schrieb:
> In general the only answer to this type of situation is hand editing of
> the dump file to deal with any syntax additions.
cute
>   For this particular
> combination of versions, however, some experimentation suggests that you
> can get away with using 8.1's pg_dump to extract data from the 8.2
> server (you'll have to give it the -i option).
I'll try that. Thanks.  :)

> But having said that ... I'm pretty sure your provider could run 8.2
> if he wanted to.  Doesn't Debian offer backports?
>
Yes they have.
But 8.1.8 is the most recent _stable_ version of PG that Debian distributes.
Like I mentioned, the particular provider runs Debian (3.1) Sarge from
2005 which is classified as "oldstable" even in the dusty world of
Debian. It's native PG version is 7.4 or 7.5.
So the 8.1.8 is the backport from the most modern "stable" Debian 4.0
that came out just recently.
PG 8.2.x is far away in the "testing" department of Debian.



regards
Andreas