Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 48421B5DC17 for ; Thu, 21 Jul 2011 13:13:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 47810-01 for ; Thu, 21 Jul 2011 16:13:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 71E4FB5DC0F for ; Thu, 21 Jul 2011 13:13:34 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p6LGDXa7082570 for ; Thu, 21 Jul 2011 16:13:33 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p6LGDXLC082569; Thu, 21 Jul 2011 16:13:33 GMT (envelope-from www) Date: Thu, 21 Jul 2011 16:13:33 GMT Message-Id: <201107211613.p6LGDXLC082569@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6127: pg_restore failing: unexpected message type 0x58 during COPY from stdin From: "Greg Johnson" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201107/156 X-Sequence-Number: 30768 The following bug has been logged online: Bug reference: 6127 Logged by: Greg Johnson Email address: greg.johnson@interprose.com PostgreSQL version: pg_dump (Postgr Operating system: CentOS release 5.6 (Final) Description: pg_restore failing: unexpected message type 0x58 during COPY from stdin Details: I am running into an error loading a backup of the production database.. never had a problem before. These are dump /restore commands I am using: pg_dump -Fc -h ackbar -U webar_admin webar -f /var/portal/backup/db/webar-20110719180003.gz pg_restore -d webar_dev -U webar_admin -Fc webar-20110719180003.gz Both machines have same version of postgres : [root@awing ~]# pg_dump --version pg_dump (PostgreSQL) 8.4.8 [root@dev ~]# pg_restore --version pg_restore (PostgreSQL) 8.4.8 MD5s are the same: [root@awing db]# md5sum webar-20110719180003.gz f4ec991e4635cd70a1f85864e04e6214 webar-20110719180003.gz [root@dev ~]# md5sum webar-20110719180003.gz f4ec991e4635cd70a1f85864e04e6214 webar-20110719180003.gz This is the error from dev while trying to restore: pg_restore: [custom archiver] could not read from input file: end of file Here is what I found in the pg_log file: LOG: checkpoint starting: xlog LOG: checkpoint complete: wrote 8147 buffers (3.1%); 0 transaction log file(s) added, 0 removed, 128 recycled; write=192.644 s, sync=1.613 s, total=194.269 s ERROR: unexpected message type 0x58 during COPY from stdin CONTEXT: COPY form_big, line 9195632 Here is another log entry: TRUNCATE TABLE ONLY form_field_config; LOG: statement: COPY form_field_config (form_field_config_id, form_config_id, identifier, label, field_type, field_group, required, display_on_summary, new_line, col_span, field_order, searchable, fk_form_config_id, fk_label, fk_on_delete_action, primary_key, form_big_column) FROM stdin; LOG: checkpoint starting: time LOG: checkpoint complete: wrote 160 buffers (0.1%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=31.811 s, sync=0.066 s, total=33.898 s ERROR: unexpected message type 0x58 during COPY from stdin CONTEXT: COPY form_config, line 1 STATEMENT: COPY form_config (form_config_id, customer_id, identifier, form_config_type, label, description, icon, location, allow_multiple, created_by, create_date, last_updated_by, last_updated, view_on_update, view_on_insert, "position", record_label, converted, text_count, bigint_count, timestamp_count, real_count, boolean_count) FROM stdin; LOG: could not send data to client: Broken pipe STATEMENT: COPY form_config (form_config_id, customer_id, identifier, form_config_type, label, description, icon, location, allow_multiple, created_by, create_date, last_updated_by, last_updated, view_on_update, view_on_insert, "position", record_label, converted, text_count, bigint_count, timestamp_count, real_count, boolean_count) FROM stdin; LOG: unexpected EOF on client connection ERROR: unexpected message type 0x58 during COPY from stdin Looks like they are happening at different spots.. I have tried 5 different dump/restores and all error out. There is nothing in /var/log/messages