pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Postgresql crashdown and recovery failure
Date: Thu, 10 Jun 2021 22:41:17 -0500
Message-ID: <df7b490d-0912-5f9d-d69c-f87701066929@gmail.com> (raw)
In-Reply-To: <2715b5290b7548a8a98d14f720008793@huawei.com>
References: <2715b5290b7548a8a98d14f720008793@huawei.com>

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.

view thread (3+ messages)

Message-ID: <df7b490d-0912-5f9d-d69c-f87701066929@gmail.com>
Permalink:  ../df7b490d-0912-5f9d-d69c-f87701066929@gmail.com/
Also on:    postgresql.org/message-id/df7b490d-0912-5f9d-d69c-f87701066929@gmail.com

 · 

reply

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: ronljohnsonjr@gmail.com
  Subject: Re: Postgresql crashdown and recovery failure
  In-Reply-To: <df7b490d-0912-5f9d-d69c-f87701066929@gmail.com>
  References: <2715b5290b7548a8a98d14f720008793@huawei.com> <df7b490d-0912-5f9d-d69c-f87701066929@gmail.com>

* 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