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 1qm9Ag-005omo-Hb for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Sep 2023 08:48:26 +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 1qm9Af-0033lJ-3t for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Sep 2023 08:48:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qm9Ae-0033l8-LA for pgsql-hackers@lists.postgresql.org; Fri, 29 Sep 2023 08:48:24 +0000 Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qm9Ac-007G1K-C5 for pgsql-hackers@lists.postgresql.org; Fri, 29 Sep 2023 08:48:23 +0000 Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-57bf04841ccso810281eaf.0 for ; Fri, 29 Sep 2023 01:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695977301; x=1696582101; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dD06JNAAQZLc7pLtRBBkI3NU8dN3UQ6jQPUnu9kQZjI=; b=avXPcrL2ao9xZy5A5wHhV32pqsbE1/DvplNJs2ry3SCK7LX7xOtTE9ff19nySAYLhh sQahilIc06W6sDQyJnwetjA99smOeCc8UdKM7Z8DAjavWJ749wwciVpZee4GW1EOO1T3 K8IZiIreyEd1CxYmoXBKWt12cF5uEdO6/ujPNgKixR+bQMHs5wsofJWRY+34a1LNAcRd K4UYmxaaAa/8a6DTmR8ZJTW2pVDbFDd3c1Z0xTYZTH/l4sZk++vqM8f997A1HQ9Quk4m rumzTMfXo/2PFlNEudwVTMo0JcJWWEB95TsXkEezo48i5wqTImrgv/QI/yetMQqyPxma 18Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695977301; x=1696582101; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dD06JNAAQZLc7pLtRBBkI3NU8dN3UQ6jQPUnu9kQZjI=; b=GLb3lsvg75R9Lc4D8MYTUoint1dePnuSKwbvJv4A5GmHRiAgZJ1iLE0or4/mF8llIE wBqJ63+bl6UkSdXPg0imcDbyQuCGzAY2E/Lq4CWuUGbvZ5+/1OE+0qis2PrvMkNjz0+8 U+a7toFWU2J6KtU/zFX75yrTsScWpRY2kHjYnpOijfJAtVOC/dQqMtJrqwnrFpW40MTX 852o7ut4LQHGYd1I4BDDq/ijBJ84+WmzZYyHblgatsPDmOwsEIrk11NAHfeQ15ywe+rS 2rfSQvjn7QetS+jiq3w/5M5HQ9rh8Qc83fCr1LWi0Kjjqt52T/HIYvJWxIWG2Q6B+ZHE iNEw== X-Gm-Message-State: AOJu0YxL1sji4uhPMW4bHHCSeKUG65zsJ6ldaUY6YnxMNp66wAc2qC77 +KMQY/Gujp8Kz5wohdh7fdAbn7rjZOxnaGLsdRPY1tFUbaY= X-Google-Smtp-Source: AGHT+IF4PzBpDU5h3HnOKigLE6/L/Fb0QYxbVK+S6BJQGnMxziupWzi0eTZPgXFMYHfkkXxeGCAqV6Vx7OTrOgCuduQ= X-Received: by 2002:a05:6870:eca2:b0:1d6:790f:2007 with SMTP id eo34-20020a056870eca200b001d6790f2007mr4272470oab.4.1695977300432; Fri, 29 Sep 2023 01:48:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fabrice Chapuis Date: Fri, 29 Sep 2023 10:48:09 +0200 Message-ID: Subject: Re: wal recycling problem To: Christoph Moench-Tegeder Cc: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000008a1ca506067b7c14" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008a1ca506067b7c14 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, barman replication can keep up with primary, wals segments size are under max_wal_size (24Gb in our configuration) Here is pg_replication_slots view: barman_ge physical f t 39409 1EE2/49000000 reserved f barman_be physical f t 39434 1EE2/3D000000 reserved f on the other hand there are 2 slots for logical replication which display status extended. I don't understand why given that the confirmed_flush_lsn field that is up to date. The restart_lsn remains frozen, for what reason? pgoutput =E2=94=82 logical =E2=94=82 2667915 =E2=94=82 db019a00 =E2=94=82= f =E2=94=82 t =E2=94=82 1880162 =E2=94=82 =E2=94=82 68512101 =E2=94=82 1ECA/37C3F1B8 =E2=94=82 1EE= 2/4D6BDCF8 =E2=94=82 extended =E2=94=82 =E2=94=82 f =E2=94=82 pgoutput =E2=94=82 logical =E2=94=82 2668584 =E2=94=82 db038a00 =E2=94=82= f =E2=94=82 t =E2=94=82 363230 =E2=94=82 =E2=94=82 68512101 =E2=94=82 1ECA/37C3F1B8 =E2= =94=82 1EE2/4D6BDCF8 =E2=94=82 extended =E2=94=82 =E2=94=82 f =E2=94=82 Regards Fabrice On Thu, Sep 28, 2023 at 7:59=E2=80=AFPM Christoph Moench-Tegeder wrote: > ## Fabrice Chapuis (fabrice636861@gmail.com): > > > We have a cluster of 2 members (1 primary and 1 standby) with Postgres > > version 14.9 and 2 barman server, slots are only configured for barman, > > barman is version 3.7. > > The obvious question here is: can both of those barmans keep up with > your database, or are you seeing WAL retention due to exactly these > replication slots? (Check pg_replication_slots). > > Regards, > Christoph > > -- > Spare Space > --0000000000008a1ca506067b7c14 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, ba= rman replication can keep up with primary, wals segments size are under max= _wal_size (24Gb in our configuration)

Here is=C2=A0 pg_replication_slots view:
=
barman_ge=C2=A0 =C2=A0 =C2=A0 physical=C2=A0 f=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 t=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 39409 1EE2/= 49000000=C2=A0 reserved=C2=A0 =C2=A0 f=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
barman_be=C2=A0 =C2=A0 =C2=A0 physical=C2=A0 f=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 t=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 39434 1EE2/3D00000= 0 reserved=C2=A0 =C2=A0 f=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0

on the other hand there are 2 slots for logical replic= ation which display status extended. I don't understand why given that = the confirmed_flush_lsn field that is up to date. The restart_lsn remains f= rozen, for what reason?

pgoutput =E2=94=82 lo= gical=C2=A0 =C2=A0=E2=94=82 2667915 =E2=94=82 db019a00 =E2=94=82 f=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=82 t=C2=A0 =C2=A0 =C2=A0 =E2=94=82=C2=A0 = =C2=A0 1880162 =E2=94=82=C2=A0 =C2=A0 =C2=A0 =E2=94=82=C2=A0 =C2=A0 =C2=A06= 8512101 =E2=94=82 1ECA/37C3F1B8 =E2=94=82 1EE2/4D6BDCF8=C2=A0 =C2=A0 =C2=A0= =C2=A0=E2=94=82 extended=C2=A0 =C2=A0=E2=94=82=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=82 f=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2= =94=82
pgoutput =E2=94=82 logical=C2=A0 =C2=A0=E2=94=82 2668584 = =E2=94=82 db038a00 =E2=94=82 f=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=82 t= =C2=A0 =C2=A0 =C2=A0 =E2=94=82=C2=A0 =C2=A0 =C2=A0363230=C2=A0 =E2=94=82=C2= =A0 =C2=A0 =C2=A0 =E2=94=82=C2=A0 =C2=A0 =C2=A068512101 =E2=94=82 1ECA/37C3= F1B8 =E2=94=82 1EE2/4D6BDCF8=C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=82 extended= =C2=A0 =C2=A0=E2=94=82=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=E2=94=82 f=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=82
<= br>
Regards
Fabrice
=
--0000000000008a1ca506067b7c14--