Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCBiL-003klS-Uz for pgsql-admin@arkaria.postgresql.org; Wed, 29 May 2024 05:19:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sCBiL-00DQF3-TQ for pgsql-admin@arkaria.postgresql.org; Wed, 29 May 2024 05:19:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCBiL-00DQEv-Gs for pgsql-admin@lists.postgresql.org; Wed, 29 May 2024 05:19:05 +0000 Received: from truschnigg.info ([89.163.150.210]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCBiD-001IBi-LI for pgsql-admin@lists.postgresql.org; Wed, 29 May 2024 05:19:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=truschnigg.info; s=m22; t=1716959936; bh=zXhfiRiKyQJmu1mD7uCCk8y8zxBmZeVt4bdUn3ot30I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c+8NlxQWk71cbNxIbE97qtLrKmZb/6gEJJZi1njTwAGmxOuG6z1NWo1LbAwOm7J3y A5k+lR5WyDtYWG3bCT/4zVZVPJQzPb2Km4v2Fet/KRk4ubzo8U4hH5vhzD3e4mJWBi Earr3lPFIkalhTlY07rAoYeG9Fdw9ongAoMpKIVcdITW3OiPDIchC+qzRyX9cMuHzU C8Vx0vo4WjnBjMcKG1dQ8j8jYDLoYn9XamPL6rc4ZofrAAd6J7M+5zYzPaMkXGFQeK g2+CXx2EMiHdQC30EVrvbSzZVCtB8gBpPMjBVdD95VpBO/KTO8mdcgCCztTxfbHDD5 zBjeJaODD3rSw== Received: from vault.lan (unknown [IPv6:2a02:1748:fafe:cf3f:1eb7:2cff:fe02:8261]) by truschnigg.info (Postfix) with ESMTPSA id CBF2920031; Wed, 29 May 2024 05:18:55 +0000 (UTC) Date: Wed, 29 May 2024 07:18:53 +0200 From: Johannes Truschnigg To: Ron Johnson Cc: Pgsql-admin Subject: Re: Postgresql 9.5: Streaming Replication: Secondaries Fail To Start Post WAL Error Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d7fD3Y7fCVgdn7Gw" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --d7fD3Y7fCVgdn7Gw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 28, 2024 at 05:24:56PM -0400, Ron Johnson wrote: > On Tue, May 28, 2024 at 3:11=E2=80=AFPM Johannes Truschnigg < > >[...] > > Yes, replication slots can interrupt your primary. > > >=20 > Please define "interrupt". Using a replication slot, I thought files wou= ld > just accumulate in pg_wal while the replica is down (or the network is > slow, or the replica can't keep up with the primary). >=20 > Disaster, of course, when that disk fills up, but that's always been the > case. And that is exactly the scenario I meant when I said "interrupt". If you use replication slots, your monitoring/alerting isn't set up correctly, and you= 're accumulating a lot of WAL, chances are ENOSPC on the primary is around the corner for you. That's why I generally prefer a WAL archive on a separate file system for replicas to source segments from, because filling that up won't break the primary (unless the archive_command misbehaves). That also needs proper monitoring/alerting, of course (and a contingency plan for what to do when/= if the archive runs over) - but everyone whose workload is important enough fo= r a replication setup to make sense is required to have that in my book. --=20 with best regards: - Johannes Truschnigg ( johannes@truschnigg.info ) www: https://johannes.truschnigg.info/ --d7fD3Y7fCVgdn7Gw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEGu9IhkI+7/aKLUWF95W3jMsYfLUFAmZWuroACgkQ95W3jMsY fLW/tQ/9GxAhpTQBLot612H2qlPIZPBvWb6P00XG1TccOcMvQAF8OqOFfOemx0u0 FXmKmY11FKADkcEQ+G+ldPM6wXaVDRJ4Anpi8T2sIbDc1E7tNw9UYTEOfurglXy3 dIk4CjtUrjdyhTR1zlHwS9z6EpFgMO1gy/OEimHMfute1WLZU87nYA3jmTpQj+d6 KzlhXl11n2xzaoDLJag32nkNMhjgyd5cO069EIYZBcg46A7gVdkbtINJp6ddWTS1 FeTOw5yuFq6h9/33yYVtNACNCgDPajOTxFFp8YBmkd25WVKG1dlRDToqE2gDt6Xy sq6TazcMFgy1U7pR8+jvCDPVxUtAKUoIJDoJk9E7cJeuEsLjHo1YGQeDMaME7vdS +o81qfEBrSbYaRCgA8l4oN4CJPzpK3KCovfH3yaprohWD91WOHBATQ9uQEextOUE cDJAIz8L58bvoDAFlXugt1EZyeKb/BrLWrr1Qn49CNVXKZXjDVdasZlBbji55FQ7 qKFltaXQd9EC2+IsxEbPBgd6DWCKTOAZz9+LSWrFDGgYto8dbC2p2j0BnTXCuozV tRhlCEc7rPjCxzu7crkykhG5TqO9QR0JriREXLSDkTRZibTqXtP2tXACM6POnz/2 C/dANpOEjIyoCeKHsOdw4fhe8Yvf9/4WTBY5EsPvLlUiTEvUwuU= =sK4n -----END PGP SIGNATURE----- --d7fD3Y7fCVgdn7Gw--