Re: Postgresql crashdown and recovery failure

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgresql crashdown and recovery failure
Date: 2021-06-11 03:41:17
Message-ID: df7b490d-0912-5f9d-d69c-f87701066929@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/10/21 10:30 PM, xiebin (F) wrote:
>
> Hi,
>
> My database (Postgresql 12.5) server uses remote storage as data directory.
>
> I powered off the database server and started postgresql (same version) on
> another server, with same data. However it failed. I checked wal logs and
> found that the content around latest checkpoint is empty. (about 1700 zero
> bytes)
>
[snip]
>
> From the output, I can see that data files, pg_control file and wal log
> are flushed to disk. And I noticed that pg_control file is flushed between
> 2 wal flush (as noted A,B,C).
>
> Here are my questions:
>
> 1.If power off occurs between B and C. Would it be possible that
> checkpoint was written to pg_control but not to wal log? And as a
> consequence, postgresql recovery would fail?
>
> 2.Is there any other reason causing this problem?
>

Is your Postgresql instance configured to use fsync?

> 3.Is there any way to recover the data? I know pg_resetwal can reset wal
> log, then postgresql can start. But undoubtedly it could cause some data loss.
>

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Ho 2021-06-11 03:54:37 Re: Even more OT: Ditto machines [was: bottom / top posting]
Previous Message xiebin (F) 2021-06-11 03:34:24 Postgresql crashdown and recovery failure