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 1t0jbI-00CvYm-To for pgsql-admin@arkaria.postgresql.org; Tue, 15 Oct 2024 15:36:45 +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 1t0jbG-007tMF-Pj for pgsql-admin@arkaria.postgresql.org; Tue, 15 Oct 2024 15:36:43 +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 1t0jbG-007tM4-BN for pgsql-admin@lists.postgresql.org; Tue, 15 Oct 2024 15:36:42 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t0jbD-0011fm-Qe for pgsql-admin@lists.postgresql.org; Tue, 15 Oct 2024 15:36:41 +0000 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2fb57f97d75so17798291fa.2 for ; Tue, 15 Oct 2024 08:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seawardmoon.com; s=google; t=1729006598; x=1729611398; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=lSjaggb0lpsLHdPcJcCdKAqZW0+tF/NPsJO/IfkYZj4=; b=Nu5vh3wqbN7O31BnnREVsdM9fwfEhwIkdiXytwHYx0PxBkQFT+7AxUkzJHRE7IUYLj 7XoBRkWjETdOzXyhtyUhFEsVzIcBUpbU5iWYIQIQwsFjgworBcYMI4Rh8YUxB/XYJPo3 z6NOOqKOPkbahWzZb+probZSnB7rn+hr8ngtomkrZWZHmrn30MxnFoIeNxbyKDScbZzq 4TtpUrbw27v6yJQNp5hhomYCNoyllhwPfHE1BvG+P3+0CxQ5+SuUpSsxW92Fmipeh7uM iUujujCQYimDqTw57ErdxJLrej6QaZMkBKtUO1Hgv+FsKNqZ4oKnJ302NnIlYWTRaSuE OOQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729006598; x=1729611398; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lSjaggb0lpsLHdPcJcCdKAqZW0+tF/NPsJO/IfkYZj4=; b=jgGaZ3Xptw+T/N9UMM9LybZzquoEoN0FQ95L6R2dHaHt1xu3zsQRvG6qJBYQkecwwN cS0EsvZ4nl6wxTcEn4IzvHrDdtXGGHRH3TbF/hEIpRqDXyoHFDMFQE6alCcbB0m0fblQ eVLkb3Pm9JbrosZX9QI8cMBPwkrxxO3vNaKuZxegOWOVICVXXkuOuVSUWHY2y948JjB+ /1Sne8HNaFm3ZLdeuBG55YEs3inAbcyeh7V3vAnY1+VLLgVaqqPrh1S6BViw+TEtw75U dwGIildV+psIwwqa7befMnqzkiNdnmQfjwhArIzPbCd9L70cvo6cUaZk0DirPgsSB/Yj s+cA== X-Gm-Message-State: AOJu0YyT9a7aamzWm4160U4Q4OXKLJ+oL7oNWjnKN3YM3ejQD4oOplCC vjQEPO38hSLBINcNmzkSPIrdI/kCUXrkynwyGFPbwOB1JCt3I5W8LusP8xWQtW2oqXb4hIUJaVX 9GBEn4OBUXDr624aDpWwJSuuaDcudyvpna15ijuGjJoTg+KBj+tc= X-Google-Smtp-Source: AGHT+IHIWFm731DRJV8FV6O/9bdUBjbevmZu3z9x5+CG1JVzjaNjZlgpM9PJyMaCa5nvOybMLLJ9poNbH1T1waQfSpo= X-Received: by 2002:a2e:a542:0:b0:2fb:6169:c42d with SMTP id 38308e7fff4ca-2fb61bc0be8mr7371441fa.41.1729006597443; Tue, 15 Oct 2024 08:36:37 -0700 (PDT) MIME-Version: 1.0 From: Dennis White Date: Tue, 15 Oct 2024 11:36:26 -0400 Message-ID: Subject: Logical replication slot wal_status "lost" with max_slot_wal_keep_size = -1 To: Pgsql-admin Content-Type: multipart/alternative; boundary="0000000000000e3537062485b873" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000000e3537062485b873 Content-Type: text/plain; charset="UTF-8" My project's replication is failing with the following error: 2024-10-15 14:03:38.446 UTC [2840947] STATEMENT: SELECT pg_catalog.set_config('search_path', '', false); 2024-10-15 14:03:38.446 UTC [2840947] ERROR: cannot read from logical replication slot "track_subscription" 2024-10-15 14:03:38.446 UTC [2840947] DETAIL: This slot has been invalidated because it exceeded the maximum reserved size. 2024-10-15 14:03:38.446 UTC [2840947] STATEMENT: START_REPLICATION SLOT "track_subscription" LOGICAL 1380B/CBFAEFF0 (proto_version '2', publication_names '"track_ingestion"') trackdb=# select * from pg_replication_slots; slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size | two_phase --------------------+----------+-----------+--------+----------+-----------+--------+------------+------+ --------------+-------------+---------------------+------------+---------------+----------- track_subscription | pgoutput | logical | 16402 | trackdb | f | f | | | 406428081 | | 1380B/BAB7B328 | lost | | f Publisher and Subscriber DB versions: PostgreSQL 14.12 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22), 64-bit Publisher System settings: max_slot_wal_keep_size = -1 max_wal_size = 12GB wal_keep_size = 0 I have controls in place to prevent the replication lag from growing too much but was surprised to see the wal_status become "lost" given what I read about the default value for max_slot_keep_size. My search of this problem suggests I should increase max_wal_size to 96GB and perhaps set max_slot_wal_keep_size = 0. Is this correct or is there something else I should do to prevent this from *ever* happening again? Thanks, Dennis --0000000000000e3537062485b873 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

My project's replication is failin= g with the following error:

2024-10-15 14:03:38.44= 6 UTC [2840947] STATEMENT: =C2=A0SELECT pg_catalog.set_config('search_p= ath', '', false);
2024-10-15 14:03:38.446 UTC [2840947] ERRO= R: =C2=A0cannot read from logical replication slot "track_subscription= "
2024-10-15 14:03:38.446 UTC [2840947] DETAIL: =C2=A0This slot has= been invalidated because it exceeded the maximum reserved size.
2024-10= -15 14:03:38.446 UTC [2840947] STATEMENT: =C2=A0START_REPLICATION SLOT &quo= t;track_subscription" LOGICAL 1380B/CBFAEFF0 (proto_version '2'= ;, publication_names '"track_ingestion"')


trac= kdb=3D# select * from pg_replication_slots;
=C2=A0 =C2=A0 =C2=A0slot_nam= e =C2=A0 =C2=A0 =C2=A0| =C2=A0plugin =C2=A0| slot_type | datoid | database = | temporary | active | active_pid | xmin |
=C2=A0catalog_xmin | restart_= lsn | confirmed_flush_lsn | wal_status | safe_wal_size | two_phase
----= ----------------+----------+-----------+--------+----------+-----------+---= -----+------------+------+
--------------+-------------+----------------= -----+------------+---------------+-----------
=C2=A0track_subscription = | pgoutput | logical =C2=A0 | =C2=A016402 | trackdb =C2=A0| f =C2=A0 =C2=A0= =C2=A0 =C2=A0 | f =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0| =C2=A0 =C2=A0 =C2=A0|
=C2=A0 =C2=A0 406428081 | =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 1380B/BAB7B328 =C2=A0 =C2=A0 =C2=A0| lost =C2= =A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | f
Publisher and Subscriber DB versions:
PostgreSQL 14.12 on x86_64-pc= -linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22), 64-bit=

Publisher System settings:
max_slot_wal_ke= ep_size =3D -1
max_wal_size =3D 12GB
wal_keep_size =3D 0

I have controls in place to prevent the replication lag fr= om growing too much but was surprised to see the wal_status become "lo= st" given what I read about the default value for max_slot_keep_size.<= br>
My search of this problem suggests I should increase max_wal_= size to 96GB and perhaps set max_slot_wal_keep_size =3D 0.
Is thi= s correct or is there something else I should do to prevent this from ev= er happening again?

Thanks,
Dennis



--0000000000000e3537062485b873--