Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPA4A-00012z-Qw for pgsql-general@arkaria.postgresql.org; Sun, 04 Oct 2020 19:53:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPA3c-0003q4-V1 for pgsql-general@arkaria.postgresql.org; Sun, 04 Oct 2020 19:52:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPA3b-0003pr-SS for pgsql-general@lists.postgresql.org; Sun, 04 Oct 2020 19:52:32 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPA3Z-000440-Nm for pgsql-general@postgresql.org; Sun, 04 Oct 2020 19:52:30 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 020287D8; Sun, 4 Oct 2020 15:52:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 04 Oct 2020 15:52:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=xmfjUI9HITiIkTo3G wVRaNC48riRpyq+yGm7z6Q1p2M=; b=gabFGhgtzYHKB+71LUPY8T/LE0NVvCidC PB83C6x3UAx1q048Lbv6jfzyKaodr5fTobq0QvWYBp3a8PMGhJSeMw5XXToqEQUu 9/c+FjgTRpidyQ/61JNPxmbx+5Me5533JsqPJxkIPQvkVGYl3V1LTfs9kkYEbaw0 S6qxugaqIuU/BgxFTXHLSRW//nd742O02f2lP2F7lINyKLqbQzPllMUzLt3w0Mwa kP8xW29z8N0hJL4ayHMmAHmDzL69xccal7hfD+z3WaxQZm1vRAnpBl4J/myfMJGs 6Z1bLAymDw68u/SEVwjo12x/MmJ1XoiLVI7+ehnoodjGzfcyWtvnw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrgedtgddugeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggujggfsehttdertddtredvnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeevgfelveegueejgefhgeetgefhgeehieefheehleetteei udeiiefhgffgheffteenucfkphepudeltddrleehrdduledrudegkeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.148]) by mail.messagingengine.com (Postfix) with ESMTPA id 16B8B3280063; Sun, 4 Oct 2020 15:52:26 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 33D0B2A0BE7; Sun, 4 Oct 2020 16:52:24 -0300 (-03) Date: Sun, 4 Oct 2020 16:52:24 -0300 From: Alvaro Herrera To: Robert Inder Cc: pgsql-general@postgresql.org Subject: Re: Writing WAL files Message-ID: <20201004195224.GA14394@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello Robert On 2020-Oct-04, Robert Inder wrote: > One of the things I like about the old PGSQL 9 setup is that it generates > and ships a WAL file every few minutes, even if nothing has happened in the > database. > I find it re-assuring to be able to see WAL files arriving and being > processed without problem even when the live system was idle. > > But I cannot get PGSQL 12 to do this. It only writes (and thus ships) WAL > files when something happens in the database. > If the database is idle, it simply does not write any WAL files. This is on purpose; archiving WAL files that contain nothing is pure wastage of good electrons. I suggest that in PG12 you can monitor the "lag" of a standby server more directly by looking at columns write_lag, flush_lag, replay_lag in the pg_stat_replication view. (You'll need to change your configuration so that it uses streaming replication instead of pg_standby and rsync, but that's far more convenient so it's a good change anyway.)