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 1n7ceJ-00017O-2K for pgsql-general@arkaria.postgresql.org; Wed, 12 Jan 2022 12:22:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n7ceH-0004PN-JC for pgsql-general@arkaria.postgresql.org; Wed, 12 Jan 2022 12:22:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7ceH-0004PC-8l for pgsql-general@lists.postgresql.org; Wed, 12 Jan 2022 12:22:41 +0000 Received: from co01.mbox.net ([165.212.64.31]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7ce9-0007WT-E4 for pgsql-general@lists.postgresql.org; Wed, 12 Jan 2022 12:22:40 +0000 Received: from co01.mbox.net (localhost [127.0.0.1]) by co01.mbox.net (Postfix) with ESMTP id 4JYmsf2gftzrqcqt for ; Wed, 12 Jan 2022 12:22:30 +0000 (UTC) X-USANET-Received: from co01.mbox.net [127.0.0.1] by co01.mbox.net via mtad (C8.MAIN.4.26U) with ESMTP id 333AaLmwZ0416M01; Wed, 12 Jan 2022 12:22:25 -0000 X-USANET-Routed: 3 gwsout-vs Q:cmvirus X-USANET-Routed: 3 gwsout-vs Q:cmvirus X-USANET-GWS2-Tenant: usa.net X-USANET-GWS2-Tagid: UNKN Received: from ca31.cms.usa.net [165.212.11.131] by co01.mbox.net via smtad (C8.MAIN.4.30X) with ESMTP id XID744AaLmwZ4126X01; Wed, 12 Jan 2022 12:22:24 -0000 X-USANET-Source: 165.212.11.131 OUT issa-gorissen@usa.net ca31.cms.usa.net CLR X-USANET-MsgId: XID744AaLmwZ4126X01 Received: from [192.168.79.102] [85.201.45.198] by ca31.cms.usa.net (ESMTPSA/flop.m@usa.net) via mtad (C8.MAIN.4.26U) with ESMTPSA id 578AaLmwy3744M31 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256); Wed, 12 Jan 2022 12:22:24 -0000 X-USANET-Auth: 85.201.45.198 AUTH flop.m@usa.net [192.168.79.102] TLS Message-ID: <164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net> Date: Wed, 12 Jan 2022 13:22:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-GB To: pgsql-general@lists.postgresql.org From: Issa Gorissen Subject: WAL Archiving and base backup Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Z-USANET-MsgId: XID578AaLmwZ3744X31 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello all, I've been upgrading some of our PostgreSQL instances from 9.x to 12.x and we're using a master/slave setup based on continuous archiving. I can read on https://www.postgresql.org/docs/12/continuous-archiving.html 25.3.3.2. Making an Exclusive Low-Level Backup that the exclusive method is deprecated. But then this leads me to the following problem: - Non-Exclusive Low-Level Backup requires that the functions pg_start_backup() and pg_stop_backup() be called in the *same* connection to the database - we use scripts to automate the creation of the backup and it's deployment on the slave, after a server maintenance for example - the example given in 25.3.6.1. Standalone Hot Backups still uses the exclusive (deprecated) method So I have this question, how to script the making of base backup for transfer on the slave server when the two SQL functions must be called in the same connection, in Bash for example; is this doable? Thanks for any pointers. Regards -- Issa