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 1uyU7h-008hvG-Gw for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Sep 2025 11:45:25 +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 1uyU7f-00HKY2-CX for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Sep 2025 11:45:24 +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 1uyU7e-00HKXr-VE for pgsql-hackers@lists.postgresql.org; Tue, 16 Sep 2025 11:45:23 +0000 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uyU7d-000iW6-1U for pgsql-hackers@lists.postgresql.org; Tue, 16 Sep 2025 11:45:22 +0000 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-746dae5ff93so5322525a34.0 for ; Tue, 16 Sep 2025 04:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758023121; x=1758627921; 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=WhcHGTor8Htc9NgWBca5FIX2FlB5ncOBGAmpb5ZV9Ys=; b=fw/Jgsnz861403uozAEmvuO6J5w+t0Cwm5p6MvUrReu+cK6c+A9lCptN2au/5jVYyN TmiZR0UUAvrqbnABTetRW5ojNn2a2xQRsNIi+fPMQzcYruTY2sqvJA8jS9OhDgXD70bB oJzZvAj0mraiUw8YnIYwcHtWfEhQeglQy+JZ6rkyC9WV34DBnDb9shT8RvUmqb6asbjt DMV/uRjZpxHmDGzBFZpIEP5jYVzEPeUDR/S9TH7fRQOVJO1W3B+2cM10ilPlPasnNcLW JP28quP2fCJzwKItOl0NhFwBucgic8tHKg+N5LmIskLueYJ3ctLzCCKjrDwDlhldsi0t msrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758023121; x=1758627921; 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=WhcHGTor8Htc9NgWBca5FIX2FlB5ncOBGAmpb5ZV9Ys=; b=dqbDAV0/VOU5GgEddbJqfjilgLn3g9qEhmXIJQr2AQQVHfR4o9jx9FvnrHHOmn1Xyf 8Z7T+A+IoPKYa6pcAaq81BuhyG0sbIo0zffF69FXf0663IbE9D47x/cA6yudKl0uUA14 eScikr4LCG4jN/Lzj9qUHZEv7j8d04Ey3gdQoqZffrRsJ3acQaQuX8nnGUsNvLbWTWuJ clCJGKzTESnzUGEz8Ppt2wf2C4NRzfYXc6MLdYFAK4OH0j5BL64S6OCDZ6eMV19scq1d jPG6uuxlQMKYr0bfhUkk5ctR3olM4/LWus5FRexviw31l1PRsS9IQPVLp6txL4HUW3GX AV6Q== X-Forwarded-Encrypted: i=1; AJvYcCX8yzcL1265PuaX+BJjTyXMfUpeiqz5fO03fbYwav/s5Rf8Wq5xTM6ZYfKT0q8Zyxo6rGoQDuTQYjo6Jpxm@lists.postgresql.org X-Gm-Message-State: AOJu0YzOpquoxo9aGQC8sUYvnOtDUc4TX4XejE+tMKU+rWb1avjW3rDX etCyvEV3Wtic8KK8+/jR7Fmt2yYoVSx4DtMvPahzExX2IelDfuXYpqxWSOWxyYpXZVnGyv6dM4I JNJ1T63hI0PC+z1PS6q5nHDkAQFRZUdM= X-Gm-Gg: ASbGncvJ7LSLP0dQeBqIkVo67Wyku/1S6hyw8+vy1MjKsY/35AVw3vtEQfrlfD42Mn7 H67UPgrrTmJH7R2HtYTzqyTccAPsTI79NKk2PIHzbq1HVZrnslJqxzymQFURhGGpWrnodMb0mDc WK9RC2TZIBlZSru6RBOErLkezbNDAPs0DT02kXLfAxIPnLTl4bS2ViSpAq4X0pxfO18zH2zshau 9rLVoz0LxipWg+S5cdFYSv5Xi/yaVMou/rTRybPwGDMAluHE6VKMEqZwFQPhp4= X-Google-Smtp-Source: AGHT+IGgNbCwKGf9IBtUFMbuFy6B9nvL83TuSzdUI8pAWl1Z5m3/TT4dVWfquz4YT6tRDEuxqnxSziW+epiuE8VWMUw= X-Received: by 2002:a05:6830:6a9b:b0:745:571d:2843 with SMTP id 46e09a7af769-75353678287mr10566720a34.8.1758023120849; Tue, 16 Sep 2025 04:45:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kouber Saparev Date: Tue, 16 Sep 2025 14:45:03 +0300 X-Gm-Features: AS18NWCMCZu9mDG7D6wWjQHGp4uoYLqrgO37aFDPQk_wqQp7XrawPllzKDno2FM Message-ID: Subject: Re: BF mamba failure To: Michael Paquier Cc: Bertrand Drouvot , pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000a01129063ee9a7b1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a01129063ee9a7b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D0=9D=D0=B0 =D0=BF=D1=82, 12.09.2025=E2=80=AF=D0=B3. =D0=B2 3:37 Michael P= aquier =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0: > Okay, the bit about the cascading standby is a useful piece of > information. Do you have some data about the relation reported in the > error message this is choking on based on its OID? Is this actively > used in read-only workloads, with the relation looked at in the > cascading standby? This objoid=3D767325170 is non-existent, nor was it present in the previous shutdown (objoid=3D4169049057). So I guess it is something quasi-temporary that has been dropped afterwards. > Is hot_standby_feedback enabled in the cascading > standby? Yes, hot_standby_feedback =3D on. > With which process has this cascading standby been created? > Does the workload of the primary involve a high consumption of OIDs > for relations, say many temporary tables? > Yes, we have around 150 entries added and deleted per second in pg_class, and around 800 in pg_attribute. So something is actively creating and dropping tables all the time. > > Another thing that may help is the WAL record history. Are you for > example seeing attempts to drop twice the same pgstats entry in WAL > records? Perhaps the origin of the problem is in this area. A > refcount of 2 is relevant, of course. > How could we dig into this, i.e. inspecting such attempts in the WAL records? > > I have looked a bit around but nothing has popped up here, so as far > as I know you seem to be the only one impacted by that. > > 1d6a03ea4146 and dc5f9054186a are in 17.3, so perhaps something is > still off with the drop when applied to cascading standbys. A vital > piece of information may also be with "generation", which would show > up in the error report thanks to bdda6ba30cbe, and that's included in > 17.6. A first thing would be to update to 17.6 and see how things > go for these cascading setups. If it takes a couple of weeks to have > one report, we have a hunt that may take a few months at least, except > if somebody is able to find out the race condition here, me or someone > else. > > Is it enough to upgrade the replicas or we need to upgrade the primary as well? -- Kouber --000000000000a01129063ee9a7b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=D0=9D=D0=B0 = =D0=BF=D1=82, 12.09.2025=E2=80=AF=D0=B3. =D0=B2 3:37 Michael Paquier <michael@paquier.xyz> =D0=BD=D0= =B0=D0=BF=D0=B8=D1=81=D0=B0:
Okay, the bit about the cascading standby is a useful piece of=
information.=C2=A0 Do you have some data about the relation reported in the=
error message this is choking on based on its OID?=C2=A0 Is this actively used in read-only workloads, with the relation looked at in the
cascading standby?

This objoid=3D767325170 is non-exis= tent, nor was it present in the previous shutdown (objoid=3D4169049057). So= I guess it is something quasi-temporary that has been dropped afterwards.<= /div>
=C2=A0
=C2= =A0 Is hot_standby_feedback enabled in the cascading
standby?

Yes, hot_standby_feedback =3D on.
=C2=A0
With which process ha= s this cascading standby been created?
Does the workload of the primary involve a high consumption of OIDs
for relations, say many temporary tables?

Yes, we = have around 150 entries added and deleted per second in pg_class, and aroun= d 800 in pg_attribute. So something is actively creating and dropping table= s all the time.
=C2=A0

Another thing that may help is the WAL record history.=C2=A0 Are you for example seeing attempts to drop twice the same pgstats entry in WAL
records?=C2=A0 Perhaps the origin of the problem is in this area.=C2=A0 A refcount of 2 is relevant, of course.

How could we= dig into this, i.e. inspecting such attempts in the WAL records?
=C2=A0=

I have looked a bit around but nothing has popped up here, so as far
as I know you seem to be the only one impacted by that.

1d6a03ea4146 and dc5f9054186a are in 17.3, so perhaps something is
still off with the drop when applied to cascading standbys.=C2=A0 A vital piece of information may also be with "generation", which would s= how
up in the error report thanks to bdda6ba30cbe, and that's included in 17.6.=C2=A0 A first thing would be to update to 17.6 and see how things
go for these cascading setups.=C2=A0 If it takes a couple of weeks to have<= br> one report, we have a hunt that may take a few months at least, except
if somebody is able to find out the race condition here, me or someone
else.


Is it enough to upgrade the replicas or = we need to upgrade the primary as well?

--
Kouber=C2=A0
--000000000000a01129063ee9a7b1--