Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8W9K-0002mV-Mh for pgsql-admin@arkaria.postgresql.org; Mon, 25 Mar 2019 20:24:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h8W9I-0002gg-2U for pgsql-admin@arkaria.postgresql.org; Mon, 25 Mar 2019 20:24:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8W9H-0002gY-NG for pgsql-admin@lists.postgresql.org; Mon, 25 Mar 2019 20:24:47 +0000 Received: from smtp3-g21.free.fr ([2a01:e0c:1:1599::12]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8W9A-00035V-LW for pgsql-admin@postgresql.org; Mon, 25 Mar 2019 20:24:46 +0000 Received: from firost (unknown [109.9.177.93]) (Authenticated sender: ioguix) by smtp3-g21.free.fr (Postfix) with ESMTPSA id 69D0713F8C1; Mon, 25 Mar 2019 21:24:33 +0100 (CET) Date: Mon, 25 Mar 2019 21:24:32 +0100 From: "Jehan-Guillaume (ioguix) de Rorthais" To: Mark Steben Cc: pgsql-admin Subject: Re: Monitoring hot standby replication for failure Message-ID: <20190325212432.0d16bb73@firost> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 25 Mar 2019 13:50:42 -0400 Mark Steben wrote: > Good afternoon, > > We are running postgres 9.4. We are outsourcing our databases to another > datacenter owned by a third party company. The methodology we are using to > move the database is hot standby log shipping replication. We will run > streaming replication for several days then, when the time comes to pull > the trigger and make the move, I will complete recovery, bring in a > 'production' version of postgresql.conf, restart the database, and hand it > over to the apps. > > We want to make sure that during the several days of replication we are > immediately notified if a problem arises - a missing log, a production > outage, etc. Is there a monitor or an 'in-the-box' procedure, or perhaps a > condition to check during hot standby or streaming replication to ensure > things are still running as planned, or if there is a problem? You could simply use check_pgactivity to check the streaming replication delta. Moreover, you'll be able to monitor the archiving process if you set it up.