Re: Unable to start postgresql-14

From: Johnathan Tiamoh <johnathantiamoh(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Unable to start postgresql-14
Date: 2023-12-24 16:03:24
Message-ID: CACoPQdZSRfyG58Wap5YJjmbZzhaGZB3Zwi0J-wk-OrzT7j88Xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Was this backup taken before the data directory was deleted?

Yes. I restored it from a 1-day old backup, but unfortunately, I couldn't
apply the logs.

If so how was the backup done?
It was taken with a customized script that uses pg_dump.

Does this mean you recreated the data directory from some source and
then ran pg_resetwal?

I recreated it from the backup

Do you mean you did a pg_dumpall from the Postgres instance running on
the restored data directory?

Yes. And it failed

On Sat, Dec 23, 2023 at 5:35 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 12/23/23 10:05, Johnathan Tiamoh wrote:
> > More information needed:
> >
> > 1) Exact Postgres version e.g 14.x
> >
> > Postgresql Version 14. 10
> >
> > 2) Is it community version or fork?
> >
> > Community version
> >
> > 3) What was the command you used to start the cluster?
> >
> > systemctl start postgresql-14
> >
> > 4) Do you have replication/WAL archiving set up?
> >
> > Yes.
> >
> >
> > Just to add. The data directory was accidentally deleted. At the time of
> > deletion. The secondary was broken.
>
> So that is the cause of the issue.
>
> > I restore from backup and it couldn't start.
>
> Was this backup taken before the data directory was deleted?
>
> If so how was the backup done?
>
> >
> > I ended up doing a pg_resetwal to start it and ended up with lots of
> > data corruption.
>
> Does this mean you recreated the data directory from some source and
> then ran pg_resetwal?
>
> >
> > I have try a pg_dumpall to restore in a new server and it has equally
> > failed.
>
> Do you mean you did a pg_dumpall from the Postgres instance running on
> the restored data directory?
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-12-24 16:27:21 Re: Unable to start postgresql-14
Previous Message Tom Lane 2023-12-24 15:43:35 Re: Version 16.x search_path behavior change?