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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Meera Nair <mnair(at)commvault(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, Punit Pranesh Koujalgi <pkoujalgi(at)commvault(dot)com>
Subject: Re: PostgreSQL 14.8 - server fails to start even though all transaction logs with base backup are restored
Date: 2023-08-08 14:18:12
Message-ID: ZNJOpDK8SDl3eiyz@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* Meera Nair (mnair(at)commvault(dot)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

In response to

Responses

Browse pgsql-general by date

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