WAL archive is lost

From: "matsumura(dot)ryo(at)fujitsu(dot)com" <matsumura(dot)ryo(at)fujitsu(dot)com>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: WAL archive is lost
Date: 2019-11-22 05:31:55
Message-ID: OSAPR01MB502788790877F85C7B5E0F00E8490@OSAPR01MB5027.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all

I find a situation that WAL archive file is lost but any WAL segment file is not lost.
It causes for archive recovery to fail. Is this behavior a bug?

example:

WAL segment files
000000010000000000000001
000000010000000000000002
000000010000000000000003

Archive files
000000010000000000000001
000000010000000000000003

Archive file 000000010000000000000002 is lost but WAL segment files
is continuous. Recovery with archive (i.e. PITR) stops at the end of
000000010000000000000001.

How to reproduce:
- Set up replication (primary and standby).
- Set [archive_mode = always] in standby.
- WAL receiver exits (i.e. because primary goes down)
after receiver inserts the last record in some WAL segment file
before receiver notifies the segement file to archiver(create .ready file).

Even if WAL receiver restarts, the WAL segment file is not notified to
archiver.

Regards
Ryo Matsumura

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-11-22 06:28:37 Re: adding partitioned tables to publications
Previous Message Amit Khandekar 2019-11-22 05:29:34 Re: logical decoding : exceeded maxAllocatedDescs for .spill files