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 1uyiur-00Bppw-Lh for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Sep 2025 03:33:09 +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 1uyiup-004MhG-DC for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Sep 2025 03:33:08 +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 1uyiuo-004Mh7-Sk for pgsql-hackers@lists.postgresql.org; Wed, 17 Sep 2025 03:33:07 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uyiun-000pdD-25 for pgsql-hackers@lists.postgresql.org; Wed, 17 Sep 2025 03:33:06 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id 8614F1D0013A; Tue, 16 Sep 2025 23:33:05 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Tue, 16 Sep 2025 23:33:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1758079985; x=1758166385; bh=TvrI0MWt9H Iy+DBzo5ZmyZR+t9RZrV3TJnziWe5G2Ms=; b=kg+f5txMs6Wsod6eSh3OpuKLhm 5tpRskn8BPp7pmTW1gcEu1mza/KasKU2moU3YqM6iJ92AZTDq5mMNkU1KXsRiyJi bGSq/iFug4BpknyPLKVxRzCURIhGbk6lVrN3iW9ktVF7A1ZskRHW6TJWZgkFI2M7 SB2Nfef1yYQ0pIGQ7skVRzR5ATOmelx9xCjTVM3f8R4WXPKjzUfv1KrKi2PpUjGZ u6L/IXFlu6aMx66DcWHkI09PZ9IxoxrDW0bA8+K0JSpWuL+rYOJb95TG+WO93XxY LE5ye1BAVpFfALsQRV+w9+UAyfGiFdSJMUFGGo3QrY4mFLBaJ9Am8ZZocxFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1758079985; x=1758166385; bh=TvrI0MWt9HIy+DBzo5ZmyZR+t9RZrV3TJnz iWe5G2Ms=; b=Dq3Oqhh9vlvYPflT/mAeH96mvsXsf15j9YesRkN6Nx+3MEu2KLO uezSuWWB3f4BzN01g+ygQZQpHC9O1e9fyzVp9aqy0Dgar3hbZ0eGZfy9m0/qeLvQ cxb+rmg0CRalcPhFPFBnE7b2JL6tpBtKar/HTuLO4PDw+dgR/udjuscXrG6cB5AW vGaYBSOCRFUWTjVVT75di14RenFcIbv4bqVjuPX/oqwYKCWskMtwbI4TjeFhriTT djeZKWHpMDpTRqN4W6zpPJGAiLPy0nl0hdcj2F/z6IH5yynCnmCaslN/BFVycdXw vXxy611QTX3H+6oYOJQZyj7WgWqcODua4sA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdegvdefkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtjeen ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeevteejgfejveegudekheeiueeiueei veeuiedugeehveeugffgudeuleegleeiteenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehkohhusg gvrhesghhmrghilhdrtghomhdprhgtphhtthhopegsvghrthhrrghnuggurhhouhhvohht rdhpghesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhsse hlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Sep 2025 23:33:03 -0400 (EDT) Date: Wed, 17 Sep 2025 12:32:40 +0900 From: Michael Paquier To: Kouber Saparev Cc: Bertrand Drouvot , pgsql-hackers@lists.postgresql.org Subject: Re: BF mamba failure Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RCU+V4+gZW4drYqS" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --RCU+V4+gZW4drYqS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 16, 2025 at 02:45:03PM +0300, Kouber Saparev wrote: > =D0=9D=D0=B0 =D0=BF=D1=82, 12.09.2025=E2=80=AF=D0=B3. =D0=B2 3:37 Michael= Paquier =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0: >> 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? >=20 > 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. The number of relations would most likely matter, I doubt that pg_attribute contributes a lot in the frictions. One of the test scenarios I am running is exactly that: a bunch of CREATE/DROP tables running concurrently with backends in a cascading standby accessing them, while tweaking the OID generated in the control file to force wraparounds. I am failing to re-create your problem, for now at least.=20 > > 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. > > >=20 > How could we dig into this, i.e. inspecting such attempts in the WAL > records? Yeah, with pg_walinspect or pg_waldump, but I doubt that you retain enough WAL history to be able to ping at something specific. One pattern I am looking for is duplicated drops initiated from the WAL records, when wraparound hits, or at least if there's a window small=20 enough that two WAL records are generated and attempt to generate the same entry drop. That's just an assumption at this stage. > Is it enough to upgrade the replicas or we need to upgrade the primary as > well? That would be both. There are always reasons to update to the latest minor version of Postgres. See the release notes for a bunch of them, that's usually convincing enough especially with CVEs addressed. :) -- Michael --RCU+V4+gZW4drYqS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmjKK9gACgkQnvQgOdby QH3uFxAAj7R/rDSgfAOgHtOFxY685x0Pb7Z0uAj4OQrbToZjn78uad0bq2va/ylf CWeVLPM98+t2BPqcU4P/bBBVqwHr4dCkNuqFR8hvUdveKfBsPDOxtTzjbSF9evRG XPj3JxAnkw9yB8iZp9DCsgyjw59U9wlFrzWFNfHRNR5OBjU/szfkuZeeEtSPZ+Xv 6wNzwYo1aVT7eqHEvYUScWP365s/OY7PDAKs4KFehLEFiJY8H938avyvcnR6ERMf 0PAmm82XmO6NutQWadSTL+VhOCawnM6yOVMP3i5pcZ/APsdl1yGiPEYCFaTJkOeb Q/VjgC+YeqQCfW6KowHBEEDJEWPhY2Yg6XHCANmNsCCXbtvQveGLF1Huqdj5t4tY H2I3aM76JlkignJxbnMrC2WyGtBExQ463l7hfMNs1JEE5lbdn9npRgNFxZ4wc/Eb RwYxBM8TOu6ERIlkvNorbSza3I2SJXkJEPTuB8/+RyaxsWe/CsbYn1OSofpGtIfg pq9HCrW4Oc2aFke7bJ8WxC9weLmMD6wrEbYm9zvPBFGYfn3WOKqy7Ncmz5GLUN0U UNjYqWUVfmyoPG62pAxL8o6hnNvJwTJFZTXHQ7hw5pB/iVT2nfY9J2RfyuYkdmLG Y/m2TZB2qgEb+2Tw10HQ9T1cenT9QeayJNq+tqghhAqr8EEszMI= =knT1 -----END PGP SIGNATURE----- --RCU+V4+gZW4drYqS--