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 1gyyhj-0006it-6l for pgsql-admin@arkaria.postgresql.org; Wed, 27 Feb 2019 12:52:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gyyhh-0002EB-Mg for pgsql-admin@arkaria.postgresql.org; Wed, 27 Feb 2019 12:52:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyyhh-0002AP-Df for pgsql-admin@lists.postgresql.org; Wed, 27 Feb 2019 12:52:53 +0000 Received: from truschnigg.info ([89.163.150.210]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyyha-0000Ab-Bt for pgsql-admin@postgresql.org; Wed, 27 Feb 2019 12:52:52 +0000 Received: from vault.lan (84-112-34-152.cable.dynamic.surfer.at [84.112.34.152]) by truschnigg.info (Postfix) with ESMTPSA id 7CB6B20176; Wed, 27 Feb 2019 12:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=truschnigg.info; s=mail; t=1551271964; bh=KgQBGlq47kudUre9jponEOsef44FajPiw9KaG1j3+YY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=brnm3VCeDInvoFhznreTjuS17n2XJfk6aJfdFpQNClFFNkPwGevfX+JtgT0SSAReZ AslvLzk1ygDdErzsgqRtQ15MqG0Y1ZvOtQILhZSz9HTLFGGbHIbQr79KgBKBrd70n3 v3pW54jLEulcggwHGSkmZ1ruE6LyYZ5A5Ci1SD1M= Date: Wed, 27 Feb 2019 13:52:42 +0100 From: Johannes Truschnigg To: John Scalia Cc: pgsql-admin@postgresql.org Subject: Re: Logical replication and wal segment retention Message-ID: <20190227125242.6ixy4jkzcuj55cdl@vault.lan> References: <695C083D-AFB5-431B-B022-ED442CE94794@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uo4nffbqyiuyy476" Content-Disposition: inline In-Reply-To: <695C083D-AFB5-431B-B022-ED442CE94794@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --uo4nffbqyiuyy476 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jay, On Wed, Feb 27, 2019 at 07:40:26AM -0500, John Scalia wrote: > Hello, folks, >=20 > Yesterday, I had a small file system fill up, due to some logical > replication testing we had been performing. We had been testing IBM=E2=80= =99s IIDR > system and apparently it had built a logical replication slot on my serve= r. > When the test was completed, nobody removed the slot, so WAL segments > stopped being dropped. Now I can understand the difficulty separating what > physical versus logical replication needs from the WAL segments, but as > logical replication is database specific not cluster wide, this behavior = was > a little unexpected, since the WAL segments are cluster wide. Are WAL > segments going to pile up whenever something drops a logical replication > connection? I=E2=80=99ve seen it, but it seems like this could be a bad t= hing. Since Logical Replication is piggybacked on Physical Replication, you cannot use the first without having the latter. And yes, what you experienced is o= ne of the dangers of using replication slots when having a busy database (i.e. producing lots of WAL) and a filesystem with little excess space. Under the= se circumstances, it is imperative to monitor for (and alert on) anything going awry with your replication slot consumers, and/or the size of your wal/xlog directory. It's a feature of replication slots to work that way - but one t= hat may end up biting you. --=20 with best regards: - Johannes Truschnigg ( johannes@truschnigg.info ) www: https://johannes.truschnigg.info/ phone: +43 650 2 133337 xmpp: johannes@truschnigg.info Please do not bother me with HTML-email or attachments. Thank you. --uo4nffbqyiuyy476 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEGu9IhkI+7/aKLUWF95W3jMsYfLUFAlx2iBoACgkQ95W3jMsY fLWHNBAAoW37qQ9Aj42ZZ0AdnB6v336xggB0qOui7DDN8K31GmV+QBvudQZL0qau FtB3zzx2yjwoIU3dRc1w52gyxleZTGQxvxXOp9e4XNN1gmY0V+sA70/xFS7c6Us+ kxPdlivN0YpUKjlNC9nwqzqoQejLPb1nDSPkR7LKCjJP+rC6I1Z192w+p1Us786B UM4RGLt0wVIN6XV5d2PJHq9RDfCTujarotA7Zu/oYqQCZ/eWIScrRdn3WoRm0lvA mXwxN961dIABFmbBLkexf1x+b4C9NtwZ8PzKvfF6uCwV6gWSd87wbvxhsSqZ7T0Z srLCLpfRcwq8nXqJnY7sR43gTeqJtHH4RC+QHqQPeQdwR9EUrWK3+EPDLibZ544J O+o8fnyMYh/o02O9cSScxFLTBq/AfIf7Yyu/it651AVk80O9mBEmQieSt18zyEr6 gXhnPKvsRwoLIRv9/GUHLoFphozJLnXkDimrINmwtkjr8pk4GsjHUKyi5gsXNZtE AXhD1Qg+OJUgAEUYCSDgYQwxyYNxzFbdyGyFR3YPO9OPpUwrNFis0c69+FWLfaj0 JgbrCJn1omqToZqc+qoYdbzrN7ZGGlBxY8qhU1dB2WeDC6So7FlDBs2TNhJV0MOX B8OwuGuKzKh6/VN77HVv8cl3uA0pPw+Vj7heqJALmS6/I17yNSY= =yWFm -----END PGP SIGNATURE----- --uo4nffbqyiuyy476--