cannot dump structures

Поиск
Список
Период
Сортировка
От Martin Korous
Тема cannot dump structures
Дата
Msg-id 1831.2638-2036-1082343711-1197038521@seznam.cz
обсуждение исходный текст
Ответы Re: cannot dump structures  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Ted Byers
Дата:
Сообщение: Re: SQL design pattern for a delta trigger?
Следующее
От: "Josh Harrison"
Дата:
Сообщение: Replication using WAL files