Re: PQputline error with pg_restore - Mailing list pgsql-general

From Tom Lane
Subject Re: PQputline error with pg_restore
Date
Msg-id 2261.1139504983@sss.pgh.pa.us
Whole thread Raw
In response to PQputline error with pg_restore  (Jennifer Drake <drakeji@vcu.edu>)
List pgsql-general
Jennifer Drake <drakeji@vcu.edu> writes:
> I am running PostgreSQL 7.3.2 on Mandrake 9.1

You should really update to something more current than 7.3.2 :-(

> pg_restore: [archiver(db)] error returned by PQputline
> pg_restore: *** aborted because of error

The first thing to do is get more info about the error, but
unfortunately that release of pg_restore isn't going to tell you what
the error message from PQputline is.  So you'll have to try to find
out from the postmaster's log.

> I tried checking the log for the postmaster
> (I assumed to be in /var/log), but no such file existed.

You'll need to look at the startup script Mandrake uses for postgres
to see where it sends the postmaster's stderr, but I wouldn't be
surprised to find that it sends to /dev/null :-(.  You can change the
script to redirect to some real file and then restart the postmaster and
then try the restore again.  Or reconfigure things so that the
postmaster sends its log messages to syslog --- though this may take
some fooling with syslog's configuration as well as with postgresql.conf.
(Syslog is probably a better choice for production purposes --- if you
redirect to a file, that file will continue to grow as long as the
postmaster runs.)

Once you've managed to see the underlying error message, if it doesn't
make things clear then pass the info along and we'll try to help.

BTW, another thing you could try is having pg_restore just generate
a SQL script, and then feed the SQL script to psql.  psql will probably
be more cooperative about showing the underlying message.

            regards, tom lane

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Is there a way to limit CPU usage per user
Next
From: Redefined Horizons
Date:
Subject: Debian Packages For PostgreSQL