pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor <xnasx@yandex.ru>
To: pgsql-general@postgresql.org
To: eshkinkot@gmail.com
Subject: Why standby restores some WALs many times from archive?
Date: Fri, 22 Dec 2017 17:01:24 +0300
Message-ID: <1173421513951284@web8j.yandex.ru> (raw)

Hi,

I have postgres 9.4 standby with archive-based replication (via restore_command).
PostgreSQL 9.4.12 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit

One day I noticed strange behavior in postgres logs: the same WAL has been restored many times:

"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"unexpected pageaddr 64A81/F9000000 in log segment 0000000200064AA80000005E, offset 0",,,,,,,,,""
"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005D"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005E"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA80000005F"" from archive",,,,,,,,,""
"restored log file ""0000000200064AA800000060"" from archive",,,,,,,,,""


I enabled logging of successful execution in 'restore_command' script and realized that it's really happens: some WALs are recovering again and again. And this is always connected with 'unexpected pageaddr' log message.

Some statistics of how many 'same WALs' have been restored in 3 minutes:
[vyagofarov@myserver:~] $  cut -f 2 -d '-' wals_restored.log | uniq -c -d | sort -r
      9  0000000200064AA9000000A4
      9  0000000200064AA80000005D
      8  0000000200064AAA00000044
      7  0000000200064AAA000000AB
      6  0000000200064AAA000000ED
      3  0000000200064AA7000000E8
      2  0000000200064AA80000003D
      2  0000000200064AA800000033
      2  0000000200064AA800000028
      2  0000000200064AA800000018
      2  0000000200064AA800000004
      2  0000000200064AA7000000FD

Is this a bug?


-- 
Best regards,
Victor Yagofarov





Message-ID: <1173421513951284@web8j.yandex.ru>
Permalink:  ../1173421513951284@web8j.yandex.ru/
Also on:    postgresql.org/message-id/1173421513951284@web8j.yandex.ru

 · 

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: xnasx@yandex.ru, eshkinkot@gmail.com
  Subject: Re: Why standby restores some WALs many times from archive?
  In-Reply-To: <1173421513951284@web8j.yandex.ru>
  References: <1173421513951284@web8j.yandex.ru>

* 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