From: Ian Barwick <ian@2ndquadrant.com>
To: Patrick Baker <patrickbakerbr@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: WAL segment NOT FOUND - Postgres 9.2
Date: Thu, 2 Jun 2016 11:35:55 +0900
Message-ID: <574F9B8B.9030000@2ndquadrant.com> (raw)
In-Reply-To: <CAJNY3ivsLkA4JjU+6+WuH1Kq-n6wfiCh_Jb4POrq50ZX2+iHUw@mail.gmail.com>
References: <CAJNY3ivsLkA4JjU+6+WuH1Kq-n6wfiCh_Jb4POrq50ZX2+iHUw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
On 06/02/2016 10:49 AM, Patrick Baker wrote:
> Hi guys,
>
>
> I got one master and two slaves.
>
> - slave01 = replication from master - working fine
> - slave02 = server is configured to delay for 345600 seconds (4 days).
>
> The issue is on the slave02 server
>
> *Recovery.conf:*
>
> restore_command = 'exec nice -n 19 ionice -c 2 -n 7 ../../bin/segment.sh
> "../wal_archive/%f" "%p" 345600'
>
> At about 10 days ago, I had an issue with my MASTER, and the server had to
> be restarted.
>
> *PROBLEM:*
>
> The replication on the slave02 server is not working. When looking the
> logs, I see:
>
> WAL segment `../wal_archive/00000002000011E800000012` not found
>
> I tried to copy manually that file, from my backups, then I get another
> error:
>
> Archived WAL segment `../wal_archive/00000002000011E800000012` is
> newer than the configured delay (345600 seconds)
This message is presumably generated by your "segment.sh" script. I'd
guess the file you copied is ending up with a very recent timestamp
which is causing it to be rejected by the script.
> So it seems the database hasn't been replicated since MAY 17:
>
> *on slave02 server:*
>
> ls -la /var/lib/pgsql/9.2/wal_archive:
>
> postgres postgres 16777216 May 17 18:16 00000002000011E80000000F
> postgres postgres 16777216 May 17 18:18 00000002000011E800000010
> postgres postgres 16777216 May 17 18:18 00000002000011E800000011
Guessing again - you want to be shipping the logs to the standby, but for
some reason they're not arriving in that directory. Is the
archive_command on the master working correctly? Are there any
errors in the log on the master?
Regards
Ian Barwick
--
Ian Barwick http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ian@2ndquadrant.com, patrickbakerbr@gmail.com
Subject: Re: WAL segment NOT FOUND - Postgres 9.2
In-Reply-To: <574F9B8B.9030000@2ndquadrant.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