pg_dump streaming fails - PostgreSQL 9.2

From: "drum(dot)lucas(at)gmail(dot)com" <drum(dot)lucas(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump streaming fails - PostgreSQL 9.2
Date: 2016-01-29 01:23:44
Message-ID: CAE_gQfXaOc1_AyS0bO1Ygg3NszKkFyWDNEfKPDF2wquzyUq=qQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi there!

I'm running this command: *(Trying to copy a full DB (2TB) from a
hot-standby server to a master (test) server)*

ssh postgres(at)myslaveserver "/usr/pgsql-9.2/bin/pg_dump
--exclude-table-data='junk.*' -—format=custom master_db" |
/usr/pgsql-9.2/bin/pg_restore --dbname=master_db_temp --exit-on-error
—-verbose

Then, after 3 GB I got this error:

pg_dump: Dumping the contents of table "invoices" failed: PQgetResult() failed.
pg_dump: Error message from server: ERROR: canceling statement due to
conflict with recovery
DETAIL: User was holding a relation lock for too long.
pg_dump: The command was: COPY dm.invoices (invoice_id,
format_version, ts_issue, ts_ack, customer_id, code, tag,
account_data, customer_data, invoice_data, invoice_items_data) TO
stdout;

I've tried the pg_dump command even with: "--no-unlogged-table-data"
option, but it was unsuccessful (
http://www.postgresql.org/message-id/E1TutDO-0001Hb-2v@wrigleys.postgresql.org
)

DB size: 2 TB

How can I solve the problem? What's going on? Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2016-01-29 01:30:59 Re: pg_dump streaming fails - PostgreSQL 9.2
Previous Message John R Pierce 2016-01-28 19:02:07 repmgr quickstart...