Re: Fast Primary shutdown only after wal_sender_timeout

From: Jehan-Guillaume de Rorthais <ioguix(at)free(dot)fr>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>,pgsql-general(at)postgresql(dot)org
Subject: Re: Fast Primary shutdown only after wal_sender_timeout
Date: 2016-10-28 16:49:59
Message-ID: EA29AD10-01E7-4596-9BC2-E280ECB23CDE@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le 28 octobre 2016 12:40:24 GMT+02:00, Michael Banck <michael(dot)banck(at)credativ(dot)de> a écrit :
>Hi,
>
>I'm doing some failover tests on a 2-node streaming replication cluster
>and shutting down the primary with 'pg_ctl -m fast' results in a
>timeout
>of 50-60 seconds, pg_ctl returns only after the latter message:
>
><71804----2016-10-28 10:01:37.833 CEST-5808e5a4.1187c-transid:0>LOG:
>database system is shut down
><62866-replicator-[unbekannt]-10.1.181.30(39609)-2016-10-28
>10:02:27.963
>CEST-581305b9.f592-transid:0>LOG: terminating walsender process due to
>replication timeout
>
>If I set wal_sender_timeout (it has been commented out so far, i.e. set
>to 60 seconds) to something smaller like 10 seconds, I get a 10 second
>delay. There are no users logged into either primary or standby, nor is
>there any other activity. The hot_standby_feedback parameter is set to
>'on'.
>
>I would assume that the replication connection is shut down along with
>the backends, but this seems to be not the case, is this expected?

Yes, in normal situation. But the master ensure everything has been replicated to the connected standby before shutting down the connections.

It it hits wal_sender_timeout, maybe you have a badly disconnected standby not detected by the master? Maybe a secondary IP address moved away from the master before its shutdown ?
>
>This is on 9.5.4, self-compiled.
>
>
>Michael

/ioguix

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David R. Pike 2016-10-28 17:15:57 Row level security performance joining large tables
Previous Message Kim Rose Carlsen 2016-10-28 16:35:00 Re: How to hint two columns IS NOT DISTINCT FROM each other in a join