pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Netapp SnapCenter
Date: Mon, 22 Jun 2020 13:01:13 +0200
Message-ID: <20200622110113.GA5340@hjp.at> (raw)
In-Reply-To: <F3685BE9-6742-4E76-B79D-A89BC115F9CD@gmail.com>
References: <CABUevEyBG1+kKiT7wuSZ5OJ0WAjYztZDr2_pDe5ZivbEuU3cCg@mail.gmail.com>
	<2C6D03C3-CFF0-4F14-BA83-A2809BA29196@gmail.com>
	<20200618192642.GH6680@tamriel.snowman.net>
	<D737C052-464D-423B-887F-F322D1B44109@gmail.com>
	<20200619160248.GI6680@tamriel.snowman.net>
	<064CCB04-4279-48F1-AF1A-1C3036843350@gmail.com>
	<CABUevEwUCkjgq1pWnXpiNbgJ+oGaBU7+_kjM6Rps1HnOoUGN6w@mail.gmail.com>
	<D0D2ED86-87F4-4F7A-B0B1-FFE14EB3D65E@gmail.com>
	<20200622053610.GB3125@tamriel.snowman.net>
	<F3685BE9-6742-4E76-B79D-A89BC115F9CD@gmail.com>

On 2020-06-22 08:02:06 +0200, Paul Förster wrote:
> > On 22. Jun, 2020, at 07:36, Stephen Frost <sfrost@snowman.net> wrote:
> > The thing about this is though that the new API avoids *other* issues,
> > like what happens if the system crashes during a backup (which is an
> > entirely common thing that happens, considering how long many backups
> > take...) and it does so in a relatively reasonable way while also
> > allowing concurrent backups, which is perhaps a relatively modest
> > benefit but isn't the main point of the different API.
> 
> that makes me curious about another thing. The output of
> pg_stop_backup() is to be stored. Otherwise the backup is useless. So
> far, so good. But what if the server crashes in the middle of the
> backup and pg_stop_back() hence is never reached? In this case, it
> obviously does not create any output.

Correct. Your backup will also almost certainly be missing some files,
so it won't be usable anyway.

> Ok, you usually start the server, the database does a crash recovery
> and opens. Then, some time later, you do the usual backup and all is
> well. This is like 99.999% of all cases.
> 
> But what if you need to restore to the latest transaction while the
> database was running in backup mode during which the crash occurred.
> How does that work if no pg_stop_backup() output exists? Did I miss
> something here?

Restore the previous backup and replay WALs from there (that assumes of
course that you are archiving WALs continuously, but if you don't, you
can't do PITR in general, so if you have that requirement you are doing
it).

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (26+ messages)  latest in thread

Message-ID: <20200622110113.GA5340@hjp.at>
Permalink:  ../20200622110113.GA5340@hjp.at/
Also on:    postgresql.org/message-id/20200622110113.GA5340@hjp.at

 · 

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: hjp-pgsql@hjp.at
  Subject: Re: Netapp SnapCenter
  In-Reply-To: <20200622110113.GA5340@hjp.at>
  References: <CABUevEyBG1+kKiT7wuSZ5OJ0WAjYztZDr2_pDe5ZivbEuU3cCg@mail.gmail.com> <2C6D03C3-CFF0-4F14-BA83-A2809BA29196@gmail.com> <20200618192642.GH6680@tamriel.snowman.net> <D737C052-464D-423B-887F-F322D1B44109@gmail.com> <20200619160248.GI6680@tamriel.snowman.net> <064CCB04-4279-48F1-AF1A-1C3036843350@gmail.com> <CABUevEwUCkjgq1pWnXpiNbgJ+oGaBU7+_kjM6Rps1HnOoUGN6w@mail.gmail.com> <D0D2ED86-87F4-4F7A-B0B1-FFE14EB3D65E@gmail.com> <20200622053610.GB3125@tamriel.snowman.net> <F3685BE9-6742-4E76-B79D-A89BC115F9CD@gmail.com> <20200622110113.GA5340@hjp.at>

* 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