pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Issa Gorissen <issa-gorissen@usa.net>
To: pgsql-general@lists.postgresql.org
Subject: WAL Archiving and base backup
Date: Wed, 12 Jan 2022 13:22:22 +0100
Message-ID: <164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net> (raw)

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





view thread (21+ messages)  latest in thread

Message-ID: <164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net>
Permalink:  ../164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net/
Also on:    postgresql.org/message-id/164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: issa-gorissen@usa.net
  Subject: Re: WAL Archiving and base backup
  In-Reply-To: <164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net>
  References: <164bc278-a4cd-f7cf-613b-e1c94aa63e56@usa.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox