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 1gmNj7-0005y9-UQ for pgsql-general@arkaria.postgresql.org; Wed, 23 Jan 2019 18:58:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gmNj6-00042T-Or for pgsql-general@arkaria.postgresql.org; Wed, 23 Jan 2019 18:58:16 +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 1gmNj6-00042M-AM for pgsql-general@lists.postgresql.org; Wed, 23 Jan 2019 18:58:16 +0000 Received: from athena.simkin.ca ([2607:f040:1001:2::ff:2]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmNiz-0004Lf-BH for pgsql-general@postgresql.org; Wed, 23 Jan 2019 18:58:15 +0000 Received: from skynet.simkin.ca (skynet.simkin.ca [IPv6:2607:f040:1001:103::1000]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by athena.simkin.ca (Postfix) with ESMTPSA id 4E14BDC696E7 for ; Wed, 23 Jan 2019 10:58:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.simkin.ca; s=athena; t=1548269885; bh=wW/gcOkG9tDFfIs8kpMHw4HHnmS82zP0l7jpV3bHIRs=; h=Subject:From:To:Date:From:To:Subject:Date:Reply-To; b=b1yeYzwr19ZKGJ4LxqSTgUc3REovmAj5XkcmS+eAnoBYhSBJmOazXo5Ogx40SBnFb YvTJKEBNK83c7cc9n89dNb5bgfQpJFCT1UDsTF4C7S/nwiGdgOoSeY14lKmvgDmikP h1Si/3XBF9PpQzWni+P2wW22pA10ibkFmfE5d/TKuam68YdbijsxvfizIgwNO0JciS wRgjJe0Glk56Ul0qFeXA+9+9meXL777wQKuICI0LUhifeELh/hnCD4d8uo7krg/mA8 imLj29+/Ehi1xxGIMZDE8qtOlzRSEXAlXbtqs2CZ/1MtwqCQ+q2Yf37+rH2vh9+5tX JVRlxl6iXKwqg== Received: from skynet.simkin.ca (skynet.simkin.ca [IPv6:::1]) by skynet.simkin.ca (Postfix) with ESMTP id E3B4B21A5CB84 for ; Wed, 23 Jan 2019 10:58:04 -0800 (PST) Message-ID: <1548269884.9639.16.camel@lists.simkin.ca> Subject: Re: Monitoring PITR recovery progress From: Alan Hodgson To: pgsql-general@postgresql.org Date: Wed, 23 Jan 2019 10:58:04 -0800 In-Reply-To: References: Content-Type: multipart/alternative; boundary="=-ZiYey+SV1gvCTodXOxfL" X-PGP-Key: fp="EF82 6F8D A3BA A096 FFA3 05F2 A7A0 40A5 34E5 AA0B"; id="0x34E5AA0B"; get=; get= X-Mailer: Evolution 3.24.6 Mime-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-ZiYey+SV1gvCTodXOxfL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Wed, 2019-01-23 at 18:58 +0100, Ivan Voras wrote: > And, the actual question: how to monitor the WAL replay process? > Currently, the recovery.conf file is sitting there, with the database > running, but pg processes are idle, and pg_stat_activity doesn't list > anything which appears to be related to the recovery process. > > > The server logs each wal segment that gets processed during recovery. And you would definitely see a busy high-I/IO process applying the recovery. It also logs when the recovery is complete. And I'm pretty sure it renames recovery.conf to recovery.done or something when it's done. --=-ZiYey+SV1gvCTodXOxfL Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
On Wed, 2019-01-23 at 18:58 +0100, Ivan Voras wrote:

And, the actual question: how to monitor the WAL replay process? Currently, the recovery.conf file is sitting there, with the database running, but pg processes are idle, and pg_stat_activity doesn't list anything which appears to be related to the recovery process.




The server logs each wal segment that gets processed during recovery. And you would definitely see a busy high-I/IO process applying the recovery.

It also logs when the recovery is complete. And I'm pretty sure it renames recovery.conf to recovery.done or something when it's done.
--=-ZiYey+SV1gvCTodXOxfL--