Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eo2r0-00088J-6m for pgsql-docs@arkaria.postgresql.org; Tue, 20 Feb 2018 08:00:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo2qy-0004lq-9X for pgsql-docs@arkaria.postgresql.org; Tue, 20 Feb 2018 08:00:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eo2qy-0004lh-13 for pgsql-docs@lists.postgresql.org; Tue, 20 Feb 2018 08:00:44 +0000 Received: from mx1.stadt-zuerich.ch ([194.56.33.10]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eo2qt-0006Of-O6 for pgsql-docs@lists.postgresql.org; Tue, 20 Feb 2018 08:00:42 +0000 X-IronPort-AV: E=Sophos;i="5.46,538,1511823600"; d="scan'208";a="51546377" Received: from unknown (HELO SZHM22345.global.szh.loc) ([10.7.160.21]) by mx1.prm.szh.zone with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2018 09:00:36 +0100 Received: from SZHM22343.global.szh.loc (10.7.160.19) by SZHM22345.global.szh.loc (10.7.160.21) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Tue, 20 Feb 2018 09:00:35 +0100 Received: from SZHM22343.global.szh.loc ([fe80::d5ca:148a:b144:40c6]) by SZHM22343.global.szh.loc ([fe80::d5ca:148a:b144:40c6%19]) with mapi id 15.00.1156.000; Tue, 20 Feb 2018 09:00:35 +0100 From: "Zwettler Markus (OIZ)" To: Michael Paquier , "pgsql-docs@lists.postgresql.org" Subject: AW: docu bug? Thread-Topic: docu bug? Thread-Index: AQHTqemi2NGs13JMSEe5VSCR/CxaRaOs7Vwg Date: Tue, 20 Feb 2018 08:00:35 +0000 Message-ID: <77105e802f334fcdba8e774e98a9482c@SZHM22343.global.szh.loc> References: <151904846438.1392.12159208594449682757@wrigleys.postgresql.org> <20180220012505.GD26999@paquier.xyz> In-Reply-To: <20180220012505.GD26999@paquier.xyz> Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.16.13.33] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Yes. I think the exclusive backup method should be mentioned especially as = it is the older one. - Markus -----Urspr=FCngliche Nachricht----- Von: Michael Paquier [mailto:michael@paquier.xyz]=20 Gesendet: Dienstag, 20. Februar 2018 02:25 An: Zwettler Markus (OIZ) ; pgsql-docs@lists.po= stgresql.org Betreff: Re: docu bug? On Mon, Feb 19, 2018 at 01:54:24PM +0000, PG Doc comments form wrote: > The sample works with a NON-persistent connection (psql -c): >=20 > > 25.3.6.1. Standalone Hot Backups > ... touch /var/lib/pgsql/backup_in_progress > psql -c "select pg_start_backup('hot_backup');" > tar -cf /var/lib/pgsql/backup.tar /var/lib/pgsql/data/ psql -c "select=20 > pg_stop_backup();" > rm /var/lib/pgsql/backup_in_progress > tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/ ... > This uses the set of exclusive backup APIs, so with non-persistent connecti= ons the backup can be correctly completed. Non-exclusive backups can be de= fined using 'false' as third argument of pg_start_backup() and first argument of pg_stop_backup(). Note that for pg= _start_backup you would also need to define the second boolean argument to = decide if a checkpoint should be immediately taken or not. So you would have basically the following flow on a persistem connection: =3D# SELECT pg_start_backup('my_backup', true_or_false, false); -- keep connection alive and do stuff. =3D# SELECT pg_stop_backup(false); Do you think that the section "Tips and Examples" should mention that an ex= clusive backup method is used for this example? This may reduce the confus= ion. -- Michael