Ramalingam, Sankarakumar <Sankarakumar.Ramalingam@elavon.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°