Thread: version mismatch message

version mismatch message

From
"Christopher Kings-Lynne"
Date:
I get this in my logs from our backups.  I ahve explicitly put -i in
pg_dumpall.  How about we totally suppress this message if -i is supplied,
because obviously the person knows perfectly well it's proceeding despite
version mismatch?

Chris

pg_dump: server version: PostgreSQL 7.3.3 on i386-portbld-freebsd4.7,
compiled by GCC 2.95.4; pg_dump version: 7.3.2
pg_dump: proceeding despite version mismatch
pg_dump: server version: PostgreSQL 7.3.3 on i386-portbld-freebsd4.7,
compiled by GCC 2.95.4; pg_dump version: 7.3.2
pg_dump: proceeding despite version mismatch
pg_dump: server version: PostgreSQL 7.3.3 on i386-portbld-freebsd4.7,
compiled by GCC 2.95.4; pg_dump version: 7.3.2
pg_dump: proceeding despite version mismatch
pg_dump: server version: PostgreSQL 7.3.3 on i386-portbld-freebsd4.7,
compiled by GCC 2.95.4; pg_dump version: 7.3.2
pg_dump: proceeding despite version mismatch
pg_dump: server version: PostgreSQL 7.3.3 on i386-portbld-freebsd4.7,
compiled by GCC 2.95.4; pg_dump version: 7.3.2
pg_dump: proceeding despite version mismatch
pg_dump: server version: PostgreSQL 7.3.3 on i386-portbld-freebsd4.7,
compiled by GCC 2.95.4; pg_dump version: 7.3.2
pg_dump: proceeding despite version mismatch
pg_dump: server version: PostgreSQL 7.3.3 on i386-portbld-freebsd4.7,
compiled by GCC 2.95.4; pg_dump version: 7.3.2
pg_dump: proceeding despite version mismatch



Re: version mismatch message

From
Peter Eisentraut
Date:
Christopher Kings-Lynne writes:

> I get this in my logs from our backups.  I ahve explicitly put -i in
> pg_dumpall.  How about we totally suppress this message if -i is supplied,
> because obviously the person knows perfectly well it's proceeding despite
> version mismatch?

I think if we did that, then people would become inclined to use pg_dump
-i automatically.  The reason that the version mismatch check exists is
that we *know* that pg_dump is unable to dump a reasonably complex
database from certain versions correctly.

Nonetheless, I think a pg_dump 7.3.2 dumping a 7.3.3 database should not
raise a version mismatch message at all.  (In general, pg_dump x.y.z1
ought to be able to dump a server x.y.z2 for any z1 and z2.)  Check out
_check_database_version in pg_backup_db.c if you like to fix it.

-- 
Peter Eisentraut   peter_e@gmx.net


Re: version mismatch message

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Nonetheless, I think a pg_dump 7.3.2 dumping a 7.3.3 database should not
> raise a version mismatch message at all.

I'm unconvinced; at best, you are assuming zero bugs.  I think the
warning message is reasonable as it stands, and that what Chris ought
to be spending his time on is updating his pg_dump.
        regards, tom lane


Re: version mismatch message

From
Peter Eisentraut
Date:
Tom Lane writes:

> Peter Eisentraut <peter_e@gmx.net> writes:
> > Nonetheless, I think a pg_dump 7.3.2 dumping a 7.3.3 database should not
> > raise a version mismatch message at all.
>
> I'm unconvinced; at best, you are assuming zero bugs.

Yes.  The version mismatch message wasn't created because we are assuming
bugs, but because we know that pg_dump cannot handle the catalogs, which
is not the case when you use 7.3.2 to dump 7.3.3.  If we want to take bugs
into account, then we can't let pg_dump work with any other version,
possibly not even its own.

-- 
Peter Eisentraut   peter_e@gmx.net