Re: replication stops working

From: John DeSoi <jdesoi(at)gmail(dot)com>
To: Daniel Serodio (lists) <daniel(dot)lists(at)mandic(dot)com(dot)br>
Cc: "pgsql-general(at)postgresql(dot)org general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: replication stops working
Date: 2013-07-09 13:30:31
Message-ID: 6C01364B-970E-4FB8-B4D4-0270E1FEA7F8@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jul 8, 2013, at 5:41 PM, Daniel Serodio (lists) <daniel(dot)lists(at)mandic(dot)com(dot)br> wrote:

> If there are no errors in the log, how did you conclude that replication has stopped working? Since you're using a hot standby, you've also setup streaming replication in addition to the WAL archiving, correct?

I have an external process that calls pg_last_xact_replay_timestamp and sends an alert if the standby is more than 20 minutes out of sync.

I'm not using streaming replication, just WAL archiving at 5 minute intervals.

I just tried to restart the primary to fix it and it would not shut down. There should not have been any active connections. I finally had to power off the VM.

I think what might be happening is that rsync is hanging when trying to send a WAL file. That might explain no error in the log and difficulty stopping the server. I added a timeout to the archive command; hopefully this will fix it.

John DeSoi, Ph.D.

2013-07-08 21:06:02 EDT [27170]: [1-1] user=main,db=main8,remote=127.0.0.1(62194) FATAL: the database system is shutting down
2013-07-08 21:07:29 EDT [27189]: [1-1] user=postgres,db=postgres,remote=127.0.0.1(62195) FATAL: the database system is shutting down
2013-07-08 21:07:51 EDT [27190]: [1-1] user=postgres,db=postgres,remote=127.0.0.1(62196) FATAL: the database system is shutting down
2013-07-08 21:09:42 EDT [27275]: [1-1] user=postgres,db=postgres,remote=[local] FATAL: the database system is shutting down
2013-07-08 21:11:03 EDT [27363]: [1-1] user=[unknown],db=[unknown],remote=127.0.0.1(62199) LOG: incomplete startup packet
2013-07-08 21:11:03 EDT [27364]: [1-1] user=main,db=main8,remote=127.0.0.1(62200) FATAL: the database system is shutting down
Killed by signal 15.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Kroon 2013-07-09 13:55:47 pg 9.2.4 dblink
Previous Message Raghavendra 2013-07-09 11:30:41 Re: [GENERAL] 回复: [GENERAL] Can't create plpython language