Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hk9oc-0003FH-Q8 for pgsql-admin@arkaria.postgresql.org; Sun, 07 Jul 2019 16:15:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hk9oZ-0004n3-8Y for pgsql-admin@arkaria.postgresql.org; Sun, 07 Jul 2019 16:14:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hk9oY-0004mw-SQ for pgsql-admin@lists.postgresql.org; Sun, 07 Jul 2019 16:14:59 +0000 Received: from mail.am-soft.de ([83.218.36.120]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hk9oU-0005hG-OD for pgsql-admin@postgresql.org; Sun, 07 Jul 2019 16:14:57 +0000 Received: from mail.am-soft.de (localhost [127.0.0.1]) by mail.am-soft.de (Postfix) with ESMTP id CCC7B16E80BF for ; Sun, 7 Jul 2019 18:14:50 +0200 (CEST) Received: from tschoening-nb.fritz.box (dslb-188-102-129-135.188.102.pools.vodafone-ip.de [188.102.129.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.am-soft.de (Postfix) with ESMTPSA id A38ED16E80BD for ; Sun, 7 Jul 2019 18:14:49 +0200 (CEST) Date: Sun, 7 Jul 2019 18:14:49 +0200 From: =?utf-8?Q?Thorsten_Sch=C3=B6ning?= Organization: AM-SoFT GmbH IT-Systeme Message-ID: <105598183.20190707181449@am-soft.de> To: pgsql-admin@postgresql.org Subject: When it's really necessary to enable WAR archiving in case of low level backups? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AV-Checked: ClamAV using ClamSMTP List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi all, we are currently implementing low level backups using pg_start_backup and pg_stop_backup. While the roadmap already contains moving to pg_basebackup or even barman, I would like to better understand some aspects of what's in use currently. The first thing one is advised to do in case of low level backups is the following: > 1. Ensure that WAL archiving is enabled and working. https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-BA= SE-BACKUP "archive_command" can be an arbitrary shell command copying WAL segments anywhere and between "pg_start_backup" and "pg_stop_backup" the docs make clear that arbitrary file system tools can be used as well to copy things around. So, when "archive_command" is enabled and working before "pg_start_backup" is executed, one has to deal with the I/O-load of copying the base files and creating the WAL archives at the same time. But those latter archives are only needed before "pg_stop_backup" gets executed, depending on the given arguments even afterwards in theory. But before is enough already to save I/O. So, looking at consistency of the backup, would it be OK to actually only archive WALs when copying base files has finished? Or is there a reason the docs put that at the first advise I obviously didn't understand yet? From=20my understanding, without actually archving WAL segments, the WAL would simply grow until archiving gets enabled, without any influence on if the backup is consistent or not. The only point is that one must not forget to enable WAL archiving at all and keep=20 those segments created during backup "pg_stop_backup" tells about. Thanks! Mit freundlichen Gr=C3=BC=C3=9Fen, Thorsten Sch=C3=B6ning --=20 Thorsten Sch=C3=B6ning E-Mail: Thorsten.Schoening@AM-SoFT.de AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...........05151- 9468- 55 Fax...............05151- 9468- 88 Mobil..............0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Gesch=C3=A4ftsf=C3=BChrer: Andreas Muchow