Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buaXi-0005GV-0Q for pgsql-admin@arkaria.postgresql.org; Thu, 13 Oct 2016 07:35:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1buaXh-0000Pj-5l for pgsql-admin@arkaria.postgresql.org; Thu, 13 Oct 2016 07:35:05 +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_2) (envelope-from ) id 1buaW0-0006yC-Gz for pgsql-admin@postgresql.org; Thu, 13 Oct 2016 07:33:20 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buaVw-0006Tm-VI for pgsql-admin@postgresql.org; Thu, 13 Oct 2016 07:33:19 +0000 Received: from [192.168.0.2] (aur75-1-78-192-238-147.fbxo.proxad.net [78.192.238.147]) by mail.dalibo.com (Postfix) with ESMTPSA id 765622C0342; Thu, 13 Oct 2016 09:33:15 +0200 (CEST) Subject: Re: Error when running pg_basebackup To: "Campbell, Lance" , "pgsql-admin@postgresql.org" References: From: Julien Rouhaud Message-ID: <8154f0c1-5ac3-8769-d0b6-81c65c666dd7@dalibo.com> Date: Thu, 13 Oct 2016 09:33:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On 12/10/2016 21:31, Campbell, Lance wrote: > PostgreSQL – 9.5.4 > > Command that is being executed: > > pg_basebackup --host=localhost --xlog --gzip --write-recovery-conf > --format=t --pgdata=${BACKUPS_HOME}/${BACKUP_DATE_TIME} > > > > Error message that appears at the very end of pg_basebackup: > > pg_basebackup: could not get transaction log end position from server: > ERROR: requested WAL segment 00000001000001CD00000055 has already been > removed > > > How can I prevent this error from occurring? > You could use -X stream instead of --xlog (which is an alias for -X fetch). This consumes two wal senders instead of one, but greatly reduce the probability of having this error. The only way to really prevent this error is using replication slots, but the support for pg_basebackup is only available in 9.6. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin