Search Postgresql Archives

cannot dump structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux