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: pg_rewind success even though getting error 'record with incorrect prev-link'
Date: Wed, 30 Jan 2019 00:02:35 -0600
Message-ID: <f8844603-e772-2367-35c3-a1099a7dab7e@gmail.com> (raw)
In-Reply-To: <CANzStTBiqbj0tK0L3cbET1yr=JV9wB0y2rUvfpB3rqNGr_ZkoQ@mail.gmail.com>
References: <CANzStTDB7ipc9X-0PvLWdpwG18zCk4Ot49gtMZ8r7yPdS0oUBQ@mail.gmail.com>
	<20190130014408.GM3121@paquier.xyz>
	<CANzStTBiqbj0tK0L3cbET1yr=JV9wB0y2rUvfpB3rqNGr_ZkoQ@mail.gmail.com>

On 1/29/19 9:57 PM, Abdullah Al Maruf wrote:
> Hi Michael
>
> > This is pointing out to the end of WAL for the current timeline.  You
> > may face it after reading a WAL segment in an area which has been used
> > in the past for a recycled segment.
>
> Are you talking about error `LOG:  invalid record length at 0/B000098: 
> wanted 24, got 0` ?
> or,
>  `LOG:  record with incorrect prev-link 10000/21B0000 at 0/B000098`
>
> Actually, the 1st error is not making any issue. This node starts to 
> streaming from primary successfully.
> But when the second error comes, It appears every 5 seconds. And, the node 
> is not streaming from master.
>
> pg_rewind still resolves timeline conflict, but it's not fixing this 
> second error.
>
> Any work around??
> ----------------
> My scenario, in short, I have 1 master nodes (0th node) and three standby 
> nodes (1st,
>
> 2nd & 3rd node). When I make the 3rd node as master (by trigger file) and 
> restarts 0th node as a replica, It shows no problem.
>
> But when both nodes are offline and our leader selection chooses the 0th 
> node as a master, and tries to reattach the 3rd node as Replica, It throws 
> an error similar to:
>
> ``` LOG: invalid record length at 0/B000098: wanted 24, got 0 LOG: started 
> streaming WAL from primary at 0/B000000 on timeline 2 LOG: record with 
> incorrect prev-link 10000/21B0000 at 0/B000098 FATAL: terminating 
> walreceiver process due to administrator command LOG: record with 
> incorrect prev-link 10000/21B0000 at 0/B000098 LOG: record with incorrect 
> prev-link 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098 LOG: record with incorrect prev-link 
> 10000/21B0000 at 0/B000098
>

The only *error* I see is when you apparently manually kill the process.  
The LOG messages aren't actually errors.

-- 
Angular momentum makes the world go 'round.

view thread (5+ messages)  latest in thread

Message-ID: <f8844603-e772-2367-35c3-a1099a7dab7e@gmail.com>
Permalink:  ../f8844603-e772-2367-35c3-a1099a7dab7e@gmail.com/
Also on:    postgresql.org/message-id/f8844603-e772-2367-35c3-a1099a7dab7e@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: pg_rewind success even though getting error 'record with incorrect prev-link'
  In-Reply-To: <f8844603-e772-2367-35c3-a1099a7dab7e@gmail.com>
  References: <CANzStTDB7ipc9X-0PvLWdpwG18zCk4Ot49gtMZ8r7yPdS0oUBQ@mail.gmail.com> <20190130014408.GM3121@paquier.xyz> <CANzStTBiqbj0tK0L3cbET1yr=JV9wB0y2rUvfpB3rqNGr_ZkoQ@mail.gmail.com> <f8844603-e772-2367-35c3-a1099a7dab7e@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