From: Stephen Frost <sfrost@snowman.net>
To: Meera Nair <mnair@commvault.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Cc: Punit Pranesh Koujalgi <pkoujalgi@commvault.com>
Subject: Re: PostgreSQL 14.8 - server fails to start even though all transaction logs with base backup are restored
Date: Tue, 8 Aug 2023 10:18:12 -0400
Message-ID: <ZNJOpDK8SDl3eiyz@tamriel.snowman.net> (raw)
In-Reply-To: <BY3PR19MB5219A12E18AC5DDFA5F4F063BA0DA@BY3PR19MB5219.namprd19.prod.outlook.com>
References: <BY3PR19MB5219A12E18AC5DDFA5F4F063BA0DA@BY3PR19MB5219.namprd19.prod.outlook.com>
Greetings,
* Meera Nair (mnair@commvault.com) wrote:
> We are following https://www.postgresql.org/docs/14/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP
> Making An Exclusive Low-Level Backup.
Exclusive backups have been removed, so you really don't want to be
depending on it.
> After restoring, we see the server fails to start with below error:
Your archive doesn't seem to have all of the WAL which was generated
during the backup, which means that your backup wasn't complete and the
system cannot be restored from this backup.
> We are restoring all the transaction logs required for base backup to be consistent.
Evidently not, per the complaint from PG when it starts up.
> BACKUP_END is present in the 000000040000000200000046 segment. Why did recovery fail to find this?
It's possible to have multiple backups going concurrently. Presumably,
this was from a different backup and that's why it wasn't picked up as
being the end for this backup. You seem to have quite a few .backup
files in your archive directory which would seem to support this.
Not sure exactly what you're doing, but unless your goal is to spend a
great deal of effort developing a PG backup solution, you're really
better off using one of the existing solutions (eg: pg_basebackup or
pgBackRest). If you are developing your own backup solution for PG, you
definitely want to be using the new APIs and not using the exclusive
backup method. Please review the current (15) documentation:
https://www.postgresql.org/docs/current/continuous-archiving.html
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: sfrost@snowman.net, mnair@commvault.com, pkoujalgi@commvault.com
Subject: Re: PostgreSQL 14.8 - server fails to start even though all transaction logs with base backup are restored
In-Reply-To: <ZNJOpDK8SDl3eiyz@tamriel.snowman.net>
References: <BY3PR19MB5219A12E18AC5DDFA5F4F063BA0DA@BY3PR19MB5219.namprd19.prod.outlook.com> <ZNJOpDK8SDl3eiyz@tamriel.snowman.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