cannot dump structures

From: Martin Korous <Mortals(at)seznam(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: cannot dump structures
Date: 2007-12-07 14:42:01
Message-ID: 1831.2638-2036-1082343711-1197038521@seznam.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have on db server Postgresql 8.2.5
pg_dump (data and structures) works well.

I have copied pg_dum file (and libpq.so.5) to other server, into chroot where is apache and phppgadmin. And there is problem. Dump of structures doesnt work, onlydata OK.

I have wrote 2 minimalistic php scripts:

1] dump only data works:
<?
putenv('PGPASSWORD=password');
$cmd = '/var/pgsql/bin/pg_dump dbname -U dbuser -h hostname -a -i';
passthru($cmd);
?>

2] dump structures doesnt work
<?
putenv('PGPASSWORD=password');
$cmd = '/var/pgsql/bin/pg_dump dbname -U username -h hostname -s -i';
passthru($cmd);
?>
and in pg_log is message:
STATEMENT: SELECT (SELECT usename FROM pg_user WHERE usesysid = datdba) as dba, pg_encoding_to_char(encoding) as encoding, datpath FROM pg_database WHERE datname = 'dbname'
ERROR: column "datpath" does not exist at character 113

I have search on google, mailing lists, forums...
I know that this message means that pg_dump is old version, but its impossible, the pg_dump binary file is from dbserver.

DATABASE:
#/var/pgsql/bin/pg_dump --version
pg_dump (PostgreSQL) 8.2.5

WEBSERVER in CHROOT:
#chroot /usr/local/chroot/apache_phpPgAdmin /var/pgsql/bin/pg_dump --version
pg_dump (PostgreSQL) 8.2.5

linked with right library:
#chroot /usr/local/chroot/apache_phpPgAdmin /usr/local/ldd /var/pgsql/bin/pg_dump
libpq.so.5 => /var/pgsql/lib/libpq.so.5 (0xb7f3c000)

pg_dump on dbserver works.
same binary file on other server doesnt work.
How is it possible please?

Btw. old pg_dump for old postgresql(7.4.7) works well.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Harrison 2007-12-07 14:52:47 Replication using WAL files
Previous Message Ted Byers 2007-12-07 14:29:08 Re: SQL design pattern for a delta trigger?