Re: Replication fell out of sync

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: David Kerr <dmk(at)mr-paradox(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Replication fell out of sync
Date: 2015-03-02 23:33:22
Message-ID: 54F4F342.3030404@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 03/02/2015 03:25 PM, David Kerr wrote:
>
> Howdy,
>
> I had an instance where a replica fell out of sync with the master.
>
> Now it's in in a state where it's unable to catch up because the master has already removed the WAL segment.
>
> (logs)
> Mar 2 23:10:13 db13 postgres[11099]: [3-1] user=,db=,host= LOG: streaming replication successfully connected to primary
> Mar 2 23:10:13 db13 postgres[11099]: [4-1] user=,db=,host= FATAL: could not receive data from WAL stream: FATAL: requested WAL segment 000000060000047C0000001F has already been removed
>
>
> I was under the impression that when you setup streaming replication if you specify a restore command like : restore_command = 'cp /arch/%f %p'
>
> Then even if the slave falls out of sync, and the master removes the WAL segment, as long as you can still retrieve the WAL files, then it can bring itself back into sync.

If the archive command is also set so that the restore command has a
file to retrieve, then yes it will work that way.

--
Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, @cmdpromptinc

Now I get it: your service is designed for a customer
base that grew up with Facebook, watches Japanese seizure
robot anime, and has the attention span of a gnat.
I'm not that user., "Tyler Riddle"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Kerr 2015-03-02 23:39:28 Re: Replication fell out of sync
Previous Message David Kerr 2015-03-02 23:25:10 Replication fell out of sync