Re: [GENERAL] Streaming Replication and Firewall

2011-10-04 Thread Ian Harding
On Thu, Sep 29, 2011 at 5:32 PM, Fujii Masao masao.fu...@gmail.com wrote:
 On Fri, Sep 30, 2011 at 1:35 AM, Ian Harding harding@gmail.com wrote:
 I updated the firewall rules on a streaming replication standby server
 and thought nothing of it.  I later happened to notice on the primary
 that ps aux | grep stream didn't show streaming to that server
 anymore.  On the standby that command still showed the wal receiver
 patiently waiting for new data.

 I know I broke it, but would anything have eventually happened, or
 would the wal receiver keep patiently waiting as the world passed it
 by?

 I guess that walreceiver has been stuck because it could not detect
 the termination of connection for a while. By default, keepalive is
 enabled on the replication connection from the standby to the master,
 but how long it takes for walreceiver to notice the termination of
 connection depends on the kernel parameters related to keepalive.
 By default settings, it takes about two hours.

 Setting keepalives parameters in primary_conninfo would help to fix
 such a problem.
 http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html

 Regards,

 --
 Fujii Masao
 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
 NTT Open Source Software Center


Thank you!  That was exactly what I needed.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Streaming Replication and Firewall

2011-09-29 Thread Ian Harding
I updated the firewall rules on a streaming replication standby server
and thought nothing of it.  I later happened to notice on the primary
that ps aux | grep stream didn't show streaming to that server
anymore.  On the standby that command still showed the wal receiver
patiently waiting for new data.

I know I broke it, but would anything have eventually happened, or
would the wal receiver keep patiently waiting as the world passed it
by?

I simply restarted the standby cluster and all is well.

Thanks!

- Ian

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Streaming Replication and Firewall

2011-09-29 Thread Fujii Masao
On Fri, Sep 30, 2011 at 1:35 AM, Ian Harding harding@gmail.com wrote:
 I updated the firewall rules on a streaming replication standby server
 and thought nothing of it.  I later happened to notice on the primary
 that ps aux | grep stream didn't show streaming to that server
 anymore.  On the standby that command still showed the wal receiver
 patiently waiting for new data.

 I know I broke it, but would anything have eventually happened, or
 would the wal receiver keep patiently waiting as the world passed it
 by?

I guess that walreceiver has been stuck because it could not detect
the termination of connection for a while. By default, keepalive is
enabled on the replication connection from the standby to the master,
but how long it takes for walreceiver to notice the termination of
connection depends on the kernel parameters related to keepalive.
By default settings, it takes about two hours.

Setting keepalives parameters in primary_conninfo would help to fix
such a problem.
http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general