Re: postgres standby won't start

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres standby won't start
Date: 2015-10-05 18:11:06
Message-ID: 20151005181106.GA24662@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ramalingam, Sankarakumar <Sankarakumar(dot)Ramalingam(at)elavon(dot)com> wrote:

> We have a standby set up between two sites in two different locations. The
> replication was going on well and suddenly it stopped due to error
>
> 2015-09-08 16:07:51 EDT LOG: streaming replication successfully connected to
> primary
>
> 2015-09-08 16:07:51 EDT FATAL: could not receive data from WAL stream: FATAL:
> requested WAL segment 0000000C0000035E000000F0 has already been removed
>
>
>
> I am unable to start the DB as well.
>
> Should I restore a fresh copy from production on to this standby to make things
> in order? If yes, how to go about it. I am quite new to Postgres. Any help/
> suggestions will be greatly appreciated.

Yeah, the master doesn't have/contains the requested WAL-File, you have
to rebuild the replication with a fresh copy from the master. You can
use pg_basebackup, it's well documented.

For the future: increase wal_keep_segments and/or use physical
replications slots, if you are using 9.4 or higher.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-10-05 18:18:03 Re: postgres standby won't start
Previous Message Ramalingam, Sankarakumar 2015-10-05 17:53:08 postgres standby won't start