PQgetCopyData() failed - corruption?

Started by François Beausoleilalmost 13 years ago3 messagesgeneral
Jump to latest
#1François Beausoleil
francois@teksol.info

Hello list,

I received the following error while backing up my database:

pg_dump: Dumping the contents of table "summary_show_unique_personas_2012_10_15" failed: PQgetCopyData() failed.
pg_dump: Error message from server: pg_dump: The command was: COPY public.summary_show_unique_personas_2012_10_15 (market_id, period, show_id, service_id, service_name, gender, followers_count, interactions_count) TO stdout;

The pg_dump occurs over the network, from a client machine. The connection between both machines goes over the public Internet, but is in the same physical data center.

If I SSH onto the database server, I can dump that specific table without problem, and I'm trying a full backup right now.

I've found http://www.symantec.com/connect/forums/puredisk-disaster-recovery-backup-failed which talks about a product using PostgreSQL. The archives of this list do not have a reference to "PGgetCopyData", nor StackOverflow, dba.stackexchange or ServerFault.

Does that error indicate a database corruption? Or just a network interruption?

Thanks!
François Beausoleil

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: François Beausoleil (#1)
Re: PQgetCopyData() failed - corruption?

=?iso-8859-1?Q?Fran=E7ois_Beausoleil?= <francois@teksol.info> writes:

I received the following error while backing up my database:

pg_dump: Dumping the contents of table "summary_show_unique_personas_2012_10_15" failed: PQgetCopyData() failed.
pg_dump: Error message from server: pg_dump: The command was: COPY public.summary_show_unique_personas_2012_10_15 (market_id, period, show_id, service_id, service_name, gender, followers_count, interactions_count) TO stdout;

Hmm, what libpq version is pg_dump depending on? The lack of any "error
message from server" (which in this case really means "from libpq") is
odd. AFAICS, it is impossible in the current code for PQgetCopyData to
return a failure indication without setting up an appropriate textual
message too --- but it sure looks like it did for you, so I'm wondering
if this is an old version with some bug in the error handling code paths.

Does that error indicate a database corruption? Or just a network interruption?

I'd guess it's just a lost connection. You could look at the
postmaster's log to see what happened according to that end.
If it logged "unexpected EOF on client connection" or some such, then
it was indeed just a dropped connection.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3François Beausoleil
francois@teksol.info
In reply to: Tom Lane (#2)
Re: PQgetCopyData() failed - corruption?

Le 2013-04-18 à 16:02, Tom Lane a écrit :

=?iso-8859-1?Q?Fran=E7ois_Beausoleil?= <francois@teksol.info> writes:

I received the following error while backing up my database:

pg_dump: Dumping the contents of table "summary_show_unique_personas_2012_10_15" failed: PQgetCopyData() failed.
pg_dump: Error message from server: pg_dump: The command was: COPY public.summary_show_unique_personas_2012_10_15 (market_id, period, show_id, service_id, service_name, gender, followers_count, interactions_count) TO stdout;

Hmm, what libpq version is pg_dump depending on? The lack of any "error
message from server" (which in this case really means "from libpq") is
odd. AFAICS, it is impossible in the current code for PQgetCopyData to
return a failure indication without setting up an appropriate textual
message too --- but it sure looks like it did for you, so I'm wondering
if this is an old version with some bug in the error handling code paths.

Most recent version, as far as I can tell.

# ldd /usr/lib/postgresql/9.1/bin/pg_dump | grep pq
libpq.so.5 => /usr/lib/libpq.so.5 (0x00007ff315dcd000)
# pg_dump --version
pg_dump (PostgreSQL) 9.1.9

This is a Ubuntu 12.04, and no packages are outdated on the system that calls pg_dump. The server is 9.1.8, and is planned to upgrade this week. Yes, my firewall is up and protecting me.

Does that error indicate a database corruption? Or just a network interruption?

I'd guess it's just a lost connection. You could look at the
postmaster's log to see what happened according to that end.
If it logged "unexpected EOF on client connection" or some such, then
it was indeed just a dropped connection.

I have a few around that time, but that message appears every few seconds outside the dropped connection window. If the connection is torn down correctly, that message should not appear, right?

Anyways, looks more like a random network disconnect, since the dump that I started on the database server itself is still progressing nicely and does not appear to have problems.

Thanks for checking this out,
François Beausoleil

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload