Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzI4Z-0006SD-OQ for pgsql-docs@arkaria.postgresql.org; Mon, 20 Dec 2021 12:47:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mzI4Y-000735-HU for pgsql-docs@arkaria.postgresql.org; Mon, 20 Dec 2021 12:47:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzI4Y-00072w-9w for pgsql-docs@lists.postgresql.org; Mon, 20 Dec 2021 12:47:22 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzI4W-0002RA-1n for pgsql-docs@lists.postgresql.org; Mon, 20 Dec 2021 12:47:21 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id AB5543200645; Mon, 20 Dec 2021 07:47:18 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 20 Dec 2021 07:47:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=pjPLhXLxWuXgIE0gg9l20qwYEtW S+hF685vOXSKrgVQ=; b=Eobbt6TTJ16wNAQR1l3Bz5DnDS12DzuELA7Z259e74g RnbkOPZ1iWJ/0s8gIOEVup3pZpukHk4ecXNQB9om2leinVh+TZt+4GkARnQ2KI7s gmPogpicoc5/fLb1a0E2hSceRqGnmNNWHyaoQtWuO38/liImD5nwO7rokUUa8zsK 5UKyFWsg3NpA/2Kf2N+BghMa+kvhXZiKMC8YkQ+dvXWJLHSYLg/qg0UY8c3lW/CK kE7j/4bVAHfxyxRE/7R1CNf4Or4OJ9SO+LZHmAJqtGLufWVIBm+/DlDb+Hrr6Ojx 3IssPoqMmqc9E+UlMxAtSKZplSVt2w79p3WhY+4CmEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=pjPLhX LxWuXgIE0gg9l20qwYEtWS+hF685vOXSKrgVQ=; b=g0+RzQle8QREGS5iur9bsd CEdC3SxFVqxxyy7zkj06Q5VFeMQ9wCl86lVTSCeiCvbBeyaGKpKk+hXs9fT6vhN7 Rp9lc+pstV6u29eKyR4RNE7y8eLDQpjC3/xgPnQXVVwisPdPiCRRKGBBJBycZ9aw dAIO0qJ/8ySwapJHfvfsnZ4CmdlanBmd8CBtW7ztYNa3CkTg6mwOz970OFdY1ykb S/mk+3P//EcG7rtvIEIKyjo+1wfb14IcTungAVRvRoCvMJBtmYTHE5ub5y4xYdq6 VHDXQnjSv+VVgRAOg2NBxn/DvchUJKh8nBKhESd9Z6Bne84vzoZbq6lKOdp0z2Cw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddtvddggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeffudeffeelgffhkedukeekvedv udfgieetkeekudelfeevhffhffdtudffieeutdenucffohhmrghinhepphhoshhtghhrvg hsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Dec 2021 07:47:16 -0500 (EST) Date: Mon, 20 Dec 2021 21:47:14 +0900 From: Michael Paquier To: Dave Cramer Cc: Laurenz Albe , Pg Docs Subject: Re: The pg_stop_backup will return one row with three values. Message-ID: References: <163994808959.26053.3206807775509915477@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EyimwEhFGwiNuu92" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --EyimwEhFGwiNuu92 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 20, 2021 at 07:19:32AM -0500, Dave Cramer wrote: > The docs say it returns 3 values ? They do. Here is the relevant part: https://www.postgresql.org/docs/devel/functions-admin.html#FUNCTIONS-ADMIN-= BACKUP "The result of the function is a single record. The lsn column holds the backup's ending write-ahead log location (which again can be ignored). The second and third columns are NULL when ending an exclusive backup; after a non-exclusive backup they hold the desired contents of the label and tablespace map files." For exclusive backups, where pg_stop_backup() is used without an argument, 1 row is returned with the LSN marking the end of the backup. When pg_stop_backup(true) is used, you would get one row with three attributes: the end LSN, the label file as NULL and a tablespace map as NULL. =20 For non-exclusive backups, pg_stop_backup(false) returns those three fields, all of them being not NULL. pg_stop_backup() without an argument cannot be used for non-exclusive backups. -- Michael --EyimwEhFGwiNuu92 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmHAe1IACgkQnvQgOdby QH2A2w/+Ntai0zLeAmAjHE8rOzcdXVdtAMbD5wC0BLWF7b3H0mY5oEGuevNhxcuC zAKbx591ip+BR67YcqH7k+ZqQ6XKP6j6syF/ZnHMNAbYQOLdNACa9ez8YFD4T5pR tjZbvt7yBWpgv68vfk9t777NvJZSXhsxTvMLhBFOxnXQRjPyrHvByM9jc6QUMGUY GjuTczrZZM1NT0Va07wUTuxcW2W4Vbmi9fsvgSFNpyvl38vAKHH2l5R/mjAzZEpq V897iummUztrORhpNfvJIhBXOkwW2eDDFepl4YcFJHHH2Q5H5Mccqm0wQYmH8ByW u+AbGS5dgzMxeMdAgU+DJGYlNzqtOxvw5l3OVVCRNMqtAZD2yWET+bd3BzH3EH8N K9Zqqb/eaKipsVSZLJmVDPkAyW/PHin50rG+kWbEzFOJyY531wSCO7DZOQ/SqVYS EuImPwroO6T9Di7FudPnDyvmWGypoO7LocA1bOEmgxLtuKI9xT/DQG+ICbxhPwxe GiyqGDe5OxoBwp6L5hVw5k18k23HO8bLOBcIdU9NduBgYXpMYX3v/GozDa2TL1Bi pM+q0r9ck1wEAZtLVh7WZtpOtUzXpELl0CIHdzZjk3uUMmoopaIx9SpRz4rQbc8T CcJMF40uQtDchJYinRcfTx2mO3aBqYy34l8oeCsACzITH2kJdW4= =zn3A -----END PGP SIGNATURE----- --EyimwEhFGwiNuu92--