Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCTrj-0006Z5-Bw for pgsql-sql@arkaria.postgresql.org; Tue, 07 Jul 2015 14:28:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZCTrh-00043a-DV for pgsql-sql@arkaria.postgresql.org; Tue, 07 Jul 2015 14:28:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCTrR-0003m0-7T for pgsql-sql@postgresql.org; Tue, 07 Jul 2015 14:28:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCTrN-0003Vo-Jm for pgsql-sql@postgresql.org; Tue, 07 Jul 2015 14:28:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t67ESUpa024873; Tue, 7 Jul 2015 10:28:30 -0400 From: Tom Lane To: John Sherwood cc: pgsql-sql@postgresql.org Subject: Re: Backups failing despite many settings that should prevent it In-reply-to: References: Comments: In-reply-to John Sherwood message dated "Tue, 07 Jul 2015 23:35:23 +1000" Date: Tue, 07 Jul 2015 10:28:30 -0400 Message-ID: <24872.1436279310@sss.pgh.pa.us> X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org John Sherwood 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