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 1hkQOZ-0000jO-5X for pgsql-admin@arkaria.postgresql.org; Mon, 08 Jul 2019 09:57:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hkQOX-0002CH-CW for pgsql-admin@arkaria.postgresql.org; Mon, 08 Jul 2019 09:57:13 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkQOX-0002CA-2l for pgsql-admin@lists.postgresql.org; Mon, 08 Jul 2019 09:57:13 +0000 Received: from mail.am-soft.de ([83.218.36.120]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkQOT-0006lJ-DR for pgsql-admin@postgresql.org; Mon, 08 Jul 2019 09:57:12 +0000 Received: from mail.am-soft.de (localhost [127.0.0.1]) by mail.am-soft.de (Postfix) with ESMTP id D259216EDEC3 for ; Mon, 8 Jul 2019 11:57:07 +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 B02AB16EDEC1 for ; Mon, 8 Jul 2019 11:57:06 +0200 (CEST) Date: Mon, 8 Jul 2019 11:57:07 +0200 From: =?utf-8?Q?Thorsten_Sch=C3=B6ning?= Organization: AM-SoFT GmbH IT-Systeme Message-ID: <488977827.20190708115707@am-soft.de> To: pgsql-admin@postgresql.org Subject: Do results of pg_start_backup work without WAL segments created during backup? 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 reviewing our current backup process based on the low level pg_start_backup and pg_stop_backup using the exclusive approach. I wonder how important the WAL-archives created during backup really are in terms of if they are necessary to get Postgres up and working at all. The docs mention that after pg_start_backup has been issued, files of the data directory of Postgres can be copied however one likes. The important point seems to be that pg_start_backup does checkpointing, so that all data until the start of the backup gets written to disk. Afterwards, additional writes can happen to any file at any given time and changes are recorded using the WAL like normal. What happens WITHOUT the WAL-archives created during the backup when a cluster needs to be restored? From=20my understanding, the cluster restores as normal, but only up until the point when pg_start_backup executed. Without additionally shipping the WAL-archives later, one would simply loose the data created after pg_start_backup has been called. But once the data directory has been copied, one can add any WAL-archives later whenever one likes and they get recognized during restore. In this case, the WAL-archives created during backup are simply the same incremental changes like all other WAL-archives created after pg_stop_backup. OR are the copied files so fundamentally broken that Postgres is not able to operate at all without the WAL-archives during backup? Wouldn't make much sense to me, because Postgres needs to operate properly already to replay the WAL-archives. It needs to know from which checkpoint to start, which is available after using pg_start_backup. From my understanding, there's no info created by pg_start_backup about additionally necessary WAL-archives blocking bringing up the cluster successfully if not present. If none are available, nothing gets replayed, but things still work. Or am I getting the importance of the additional WAL-archives during backup completely wrong? 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