pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Chapman Flack <chap@anastigmatix.net>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: David Steele <david@pgmasters.net>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Date: Tue, 8 Mar 2022 12:01:07 -0800
Message-ID: <20220308200107.GA85558@nathanxps13> (raw)
In-Reply-To: <621FC447.90502@anastigmatix.net>
References: <e6657efe-f7b1-0894-9807-453c01bad81a@pgmasters.net>
	<621E4529.1090601@anastigmatix.net>
	<20220301173208.GB1031413@nathanxps13>
	<1f685b3a-7ec2-825e-bb2b-d87d78ad5bd9@pgmasters.net>
	<621E6C2E.2050801@anastigmatix.net>
	<20220301191441.GW10577@tamriel.snowman.net>
	<621E7A5C.1030203@anastigmatix.net>
	<20220301200523.GX10577@tamriel.snowman.net>
	<20220302010302.GA1182956@nathanxps13>
	<621FC447.90502@anastigmatix.net>

On Wed, Mar 02, 2022 at 02:23:51PM -0500, Chapman Flack wrote:
> I did not notice this earlier (sorry), but there seems to remain in
> backup.sgml a programlisting example that shows a psql invocation
> for pg_backup_start, then a tar command, then another psql invocation
> for pg_backup_stop.
> 
> I think that was only workable for the exclusive mode, and now it is
> necessary to issue pg_backup_start and pg_backup_stop in the same session.
> 
> (The 'touch backup_in_progress' business seems a bit bogus now too,
> suggesting an exclusivity remembered from bygone days.)
> 
> I am not sure what a workable, simple example ought to look like.
> Maybe a single psql script issuing the pg_backup_start and the
> pg_backup_stop, with a tar command in between with \! ?
> 
> Several bricks shy of production-ready, but it would give the idea.

Another option might be to just remove this section.  The top of the
section mentions that this is easily done using pg_basebackup with the -X
parameter.  The bottom part of the section includes more complicated steps
for when "more flexibility in copying the backup files is needed..."
AFAICT the more complicated strategy was around before pg_basebackup, and
the pg_basebackup recommendation was added in 2012 as part of 920febd.
Thoughts?

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (86+ messages)  latest in thread

Message-ID: <20220308200107.GA85558@nathanxps13>
Permalink:  ../20220308200107.GA85558@nathanxps13/
Also on:    postgresql.org/message-id/20220308200107.GA85558@nathanxps13

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, chap@anastigmatix.net, sfrost@snowman.net, david@pgmasters.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
  In-Reply-To: <20220308200107.GA85558@nathanxps13>

* 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