Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZVSD-0005Xj-P2 for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Mar 2023 11:26:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZVSC-0001DQ-Gg for pgsql-bugs@arkaria.postgresql.org; Tue, 07 Mar 2023 11:26:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZVSB-0001DH-Jw for pgsql-bugs@lists.postgresql.org; Tue, 07 Mar 2023 11:26:00 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZVS7-0004Eo-6s for pgsql-bugs@lists.postgresql.org; Tue, 07 Mar 2023 11:25:59 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id B555F5C029C; Tue, 7 Mar 2023 06:25:49 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 07 Mar 2023 06:25:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1678188349; x= 1678274749; bh=+pjnyyZ+vR/kdSfLnNw+hdw0EzRLb0O4z1FLiIPDZmE=; b=M FbDQyV5oAxNV8ZaPtmVRGgAovvVU2LAx0Mtnl0e2W4clIXcunxWeyNL/mtL90jbP HQwGFKUz68umwLAyrN2BS/HhGV1RRZFXVDmIoPiLKJlTEWQuDxyRYtkp8qFwC51Y kEhSjfmVbdpRQuzkVeeG20i/sdfWZatPqqwBU7ZTiBz7EFSjxDA3/W1JG81HjojK YBvbg57qdFiU5BDW645ChP9gj5+5L6eDStS29FsyermYD53Ppl0xPY1qkTQHu7y3 0ri1rtgkUAwOXoB1Bgp70MWWwnReh9ADomzve8zb7y8ObPKEyD8BqQwEY3+PHmyY 6TwcXQQaLc/loQN6He1ew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddutddgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvddufedtgfevvdfgffeghfevuddvgefhudegudffhfeg udduteettdfhvdegffehnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh dpthifihhtthgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Mar 2023 06:25:48 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0B9BB9C; Tue, 7 Mar 2023 12:25:47 +0100 (CET) Date: Tue, 7 Mar 2023 12:25:47 +0100 From: Alvaro Herrera To: Marco Boeringa Cc: pgsql-bugs@lists.postgresql.org Subject: Re: 'CLUSTER' in one database prevents running it in two others on the same database cluster (PG15.2) Message-ID: <20230307112547.imnavuk4ejxchvx2@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Mar-05, Marco Boeringa wrote: > However, as part of two secondary Python scripts running that do all kinds > of batch operations against spatial tables (generalization and such) in two > other databases on the same database cluster, at the very end of the > processing, these initialize 'CLUSTER' operations as well. Both of these now > fail with a: > "missing chunk number 0 for toast value X in pg_toast_Y" > type error. Hmm. Very strange ... > After these errors, I see the CLUSTER command listed as well in the > PostgreSQL main log, but the ERROR line mentioned above is listed just above > the actual CLUSTER statement in the log. No other anomaly / error is visible > there. The CLUSTER command just fails though on the two secondary databases. > The time displayed in the log is exactly the same for these two log lines > one after another, also the number between the square brackets listed > immediately after the "CET" of the time are the same for the same database. It would make things much more understandable if you just pasted the log lines, instead of describing details of those log lines. In you description you may omit clues that may seem trivial/unimportant to you but indicate useful things to us. One thing that I'm curious about is what the various values of 'Y' are in these lines: > The pg_toast_Y table names mentioned in the errors differ by the way between > the two databases. It would be useful if you could look up to what heap-table each of these TOAST tables correspond, with a query like SELECT oid::regclass FROM pg_class WHERE reltoastrelid = 'pg_toast.pg_toast_Y'::regclass; (ran in the database that each error was thrown from.) -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Learn about compilers. Then everything looks like either a compiler or a database, and now you have two problems but one of them is fun." https://twitter.com/thingskatedid/status/1456027786158776329