agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
Backups failing despite many settings that should prevent it
2+ messages / 2 participants
[nested] [flat]

* Backups failing despite many settings that should prevent it
@ 2015-07-07 13:35  John Sherwood <john.sherwood.was.taken@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: John Sherwood @ 2015-07-07 13:35 UTC (permalink / raw)
  To: pgsql-sql

Hi all,

I've been getting some backup failures when trying to back up a fairly
large database.  I've tried setting:

* vacuum_defer_cleanup_age very high on the master
* hot_standby_feedback = on on the slave
* max_standby_streaming_delay = 300s and max_standby_archive_delay = 300s
on the slave

Nothing seems to stop it failing intermittently.  The error I'm getting is
below:
   pg_dump: Dumping the contents of table "impressions" 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 public.impressions (id, ... ) TO stdout;
   The following system errors were returned:
   Errno::EPERM: Operation not permitted - 'pg_dump' returned exit code: 1

Any ideas what setting I'm missing?

Thanks,

John

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Backups failing despite many settings that should prevent it
@ 2015-07-07 14:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: John Sherwood <john.sherwood.was.taken@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-07-07 14:28 UTC (permalink / raw)
  To: John Sherwood <john.sherwood.was.taken@gmail.com>; +Cc: pgsql-sql

John Sherwood <john.sherwood.was.taken@gmail.com> writes:
> I've been getting some backup failures when trying to back up a fairly
> large database.  I've tried setting:

> * vacuum_defer_cleanup_age very high on the master
> * hot_standby_feedback = on on the slave
> * max_standby_streaming_delay = 300s and max_standby_archive_delay = 300s
> on the slave

> Nothing seems to stop it failing intermittently.  The error I'm getting is
> below:
>    pg_dump: Dumping the contents of table "impressions" 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 public.impressions (id, ... ) TO stdout;
>    The following system errors were returned:
>    Errno::EPERM: Operation not permitted - 'pg_dump' returned exit code: 1

> Any ideas what setting I'm missing?

Sure looks like max_standby_streaming_delay violation from here.  You sure
300s is enough time to back up your "fairly large" database?  How long
does the pg_dump run before failing, anyway?

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-07-07 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-07-07 13:35 Backups failing despite many settings that should prevent it John Sherwood <john.sherwood.was.taken@gmail.com>
2015-07-07 14:28 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox