Re: PostgreSQL 14.8 - server fails to start even though all transaction logs with base backup are restored - Mailing list pgsql-general

From Stephen Frost
Subject Re: PostgreSQL 14.8 - server fails to start even though all transaction logs with base backup are restored
Date
Msg-id ZNJOpDK8SDl3eiyz@tamriel.snowman.net
Whole thread Raw
In response to PostgreSQL 14.8 - server fails to start even though all transaction logs with base backup are restored  (Meera Nair <mnair@commvault.com>)
Responses RE: PostgreSQL 14.8 - server fails to start even though all transaction logs with base backup are restored  (Meera Nair <mnair@commvault.com>)
List pgsql-general
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

Attachment

pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: PostgreSQL 14.8 - server fails to start even though all transaction logs with base backup are restored
Next
From: Jerry Sievers
Date:
Subject: ignore_system_indexes=on no help for missing/corrupt pg_class_oid_index?