Running pg_dump from a slave server

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Running pg_dump from a slave server
Date: 2016-08-17 02:32:55
Message-ID: CAJNY3isk0+YfoQEm-LVMNFz7pCn8JVbBxnignYMug5gsAQefsw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys,

I'm using PostgreSQL 9.2 and I got one master and one slave with streaming
replication.

Currently, I got a backup script that runs daily from the master, it
generates a dump file with 30GB of data.

I changed the script to start running from the slave instead the master,
and I'm getting this errors now:

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.

Isn't that possible? I can't run pg_dump from a slave?

Cheers

Patrick

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sameer Kumar 2016-08-17 03:31:54 Re: Running pg_dump from a slave server
Previous Message dandl 2016-08-17 01:51:04 Re: [GENERAL] C++ port of Postgres