Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 001E5632FF7; Tue, 23 Feb 2010 06:34:27 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 19634-05; Tue, 23 Feb 2010 10:34:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id AF1DC632A42; Tue, 23 Feb 2010 06:34:16 -0400 (AST) Received: by wya21 with SMTP id 21so527286wya.19 for ; Tue, 23 Feb 2010 02:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=YCEDUI2ymiNKkXK1uKXp8SkXZvCMsaE1/WhycRT5D9w=; b=m1vzRRg9mc5twO0Y/O3mogKi12aaMwvXlixCvsDuuYEbCegF8mfyOyO76ftDPoCQDX CCV/d70afC2QmP8GQ5pvz9oxDViqakRCWx9kSbEi8pOIh7qDLQocr14IDqf25ECi97XQ nlFEANvnmGYMfbUz5nCIk08M4KJOSAjrnGYao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=sVniVuEuUDhEdeFcKEyFn+r9H+ueUleCDBxJBe/KD5z6hp6QvgSFtr0mHc8noM7EhO wD/8NECtvbLdz8mqxfsTZ7QqgUNTH8qLZShbpPBjnKvY+TiVBcs+DJ0bkf1mjQVcc2a2 VA2UYDMJ6BRk/qwUTW0DHS7eXL7GPfDx1Csrg= MIME-Version: 1.0 Received: by 10.216.90.208 with SMTP id e58mr543519wef.57.1266921251985; Tue, 23 Feb 2010 02:34:11 -0800 (PST) In-Reply-To: <9837222c1002230155t5559c940i354cd944fa5916c7@mail.gmail.com> References: <9837222c1002230155t5559c940i354cd944fa5916c7@mail.gmail.com> Date: Tue, 23 Feb 2010 18:34:11 +0800 Message-ID: Subject: Re: [GENERAL] pg_dump: aborting because of version mismatch From: "Net Tree Inc." To: Magnus Hagander Cc: pgsql-admin , pgsql-general Content-Type: multipart/alternative; boundary=0016e6db2ae72edad004804217a7 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201002/176 X-Sequence-Number: 33779 --0016e6db2ae72edad004804217a7 Content-Type: text/plain; charset=ISO-8859-1 Thanks.. This is what I am confused about. I installed a ver. 8.4 postgresql, why it's pg_dump is 8.3.9?? For first one, how could this possibly having problem using pg_dump that comes with the server install?? the first one I backup using pgAdmin III ver. 1.8.4 on a ver 8.3.9 postgreSQL server the second one I backup using command line on a ver 8.4 postgreSQL server Is this something that can solved by upgrade or reinstall ver. 8.4 of pg_dump? Is that its only downward compatible but not upward? which mean I can do restore on 8.4 from backup created by ver 8.3 pg_dump, but probably won't work the other way around? Definitely impossible? then what is '-i' use for.....? Steven On Tue, Feb 23, 2010 at 5:55 PM, Magnus Hagander wrote: > 2010/2/23 Net Tree Inc. : > >>>I am keep getting error of mismatch of pg_dump version. how should one > dealing with different version of pg_dump normally? > > C:\Program Files\pgAdmin III\1.8\pg_dump.exe -h 192.168.222.129 -p 5433 > -U postgres -F c -b -v -f "C:\Documents and > Settings\steven\Desktop\template.backup" template_postgis > > pg_dump: server version: 8.3.9; pg_dump version: 8.3.0 > > pg_dump: aborting because of version mismatch (Use the -i option to > proceed anyway.) > > pg_dump: *** aborted because of error > > Process returned exit code 1. > >>>If I use the '-i' option it still give the following error > > > > [postgres@localhost ~]$ pg_dump -h 172.16.1.246 -p 5432 -U postgres -Fc > -i postgres > postgres > > Password: > > pg_dump.bin: server version: 8.4.0; pg_dump.bin version: 8.3.9 > > pg_dump.bin: proceeding despite version mismatch > > pg_dump.bin: SQL command failed > > pg_dump.bin: Error message from server: ERROR: column "reltriggers" does > not exist > > LINE 1: ...oles WHERE oid = relowner) as rolname, relchecks, > reltrigger... > > ^ > > pg_dump.bin: The command was: SELECT c.tableoid, c.oid, relname, relacl, > relkind, relnamespace, (SELECT rolname FROM pg_catalog.pg_roles WHERE oid = > relowner) as rolname, relchecks, reltriggers, relhasindex, relhasrules, > relhasoids, d.refobjid as owning_tab, d.refobjsubid as owning_col, (SELECT > spcname FROM pg_tablespace t WHERE t.oid = c.reltablespace) AS > reltablespace, array_to_string(c.reloptions, ', ') as reloptions from > pg_class c left join pg_depend d on (c.relkind = 'S' and d.classid = > c.tableoid and d.objid = c.oid and d.objsubid = 0 and d.refclassid = > c.tableoid and d.deptype = 'a') where relkind in ('r', 'S', 'v', 'c') order > by c.oid > > > You're doing two different things here. In the first one it's pg_dump > 8.3.0 against server 8.3.9. This should, I think, work if you use -i. > It's not recommended, but it should work. > > In the second one, it's pg_dump 8.3.9 against server 8.4.0. This is > simply not supported. You need to use pg_dump 8.4 for server 8.4. > > > -- > Magnus Hagander > Me: http://www.hagander.net/ > Work: http://www.redpill-linpro.com/ > -- --------------------------------------- Steven Huang --0016e6db2ae72edad004804217a7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks..

This is what I am confused about. I installed a= ver. 8.4 postgresql, why it's pg_dump is 8.3.9?? For first one, how co= uld this possibly having problem using pg_dump that comes with the server i= nstall??=A0

the first one I backup using pgAdmin III ver. 1.8.4 on = a ver 8.3.9 postgreSQL server
the second one I backup using comma= nd line on a ver 8.4 postgreSQL server

Is th= is something that can solved by upgrade or reinstall ver. 8.4 of =A0pg_dump= ?=A0

Is that its only downward compatible but not upward? which m= ean I can do restore on 8.4 from backup created by ver 8.3 pg_dump, but pro= bably won't work the other way around? Definitely impossible? then what= is '-i' use for.....?

Steven


On = Tue, Feb 23, 2010 at 5:55 PM, Magnus Hagander <magnus@hagander.net> wrote:
2010/2/23 Net Tree Inc. <nettreeinc@gmail.com>:
>>>I am keep getting error of mi= smatch of pg_dump version. how should one dealing with different version of= pg_dump normally?
> C:\Program Files\pgAdmin III\1.8\pg_dump.exe -h 192.168.222.129 -p 543= 3 -U postgres -F c -b -v -f "C:\Documents and Settings\steven\Desktop\= template.backup" template_postgis
> pg_dump: server version: 8.3.9; pg_dump version: 8.3.0
> pg_dump: aborting because of version mismatch =A0(Use the -i option to= proceed anyway.)
> pg_dump: *** aborted because of error
> Process returned exit code 1.
>>>If I use the '-i' option it still give the following er= ror
>
> [postgres@localhost ~]$ pg_dump -h 172.16.1.246 -p 5432 -U postgres -F= c -i postgres > postgres
> Password:
> pg_dump.bin: server version: 8.4.0; pg_dump.bin version: 8.3.9
> pg_dump.bin: proceeding despite version mismatch
> pg_dump.bin: SQL command failed
> pg_dump.bin: Error message from server: ERROR: =A0column "reltrig= gers" does not exist
> LINE 1: ...oles WHERE oid =3D relowner) as rolname, relchecks, reltrig= ger...
> =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^
> pg_dump.bin: The command was: SELECT c.tableoid, c.oid, relname, relac= l, relkind, relnamespace, (SELECT rolname FROM pg_catalog.pg_roles WHERE oi= d =3D relowner) as rolname, relchecks, reltriggers, relhasindex, relhasrule= s, relhasoids, d.refobjid as owning_tab, d.refobjsubid as owning_col, (SELE= CT spcname FROM pg_tablespace t WHERE t.oid =3D c.reltablespace) AS reltabl= espace, array_to_string(c.reloptions, ', ') as reloptions from pg_c= lass c left join pg_depend d on (c.relkind =3D 'S' and d.classid = =3D c.tableoid and d.objid =3D c.oid and d.objsubid =3D 0 and d.refclassid = =3D c.tableoid and d.deptype =3D 'a') where relkind in ('r'= , 'S', 'v', 'c') order by c.oid


You're doing two different things here. In the first one it= 's pg_dump
8.3.0 against server 8.3.9. This should, I think, work if you use -i.
It's not recommended, but it should work.

In the second one, it's pg_dump 8.3.9 against server 8.4.0. This is
simply not supported. You need to use pg_dump 8.4 for server 8.4.


--
=A0Magnus Hagander
=A0Me: http://www.ha= gander.net/
=A0Work: http:= //www.redpill-linpro.com/



--
----------------= -----------------------
Steven Huang
--0016e6db2ae72edad004804217a7--