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 1nucxK-0006tU-SC for pgsql-general@arkaria.postgresql.org; Fri, 27 May 2022 16:36:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nucxJ-0002tB-0n for pgsql-general@arkaria.postgresql.org; Fri, 27 May 2022 16:36:53 +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 1nucxI-0002t2-MR for pgsql-general@lists.postgresql.org; Fri, 27 May 2022 16:36:52 +0000 Received: from ms-10.1blu.de ([178.254.4.101]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nucxF-0005cj-Ud for pgsql-general@lists.postgresql.org; Fri, 27 May 2022 16:36:52 +0000 Received: from [188.174.50.179] (helo=pureos) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nucxA-0000Nh-9f; Fri, 27 May 2022 18:36:44 +0200 Date: Fri, 27 May 2022 18:36:36 +0200 From: Matthias Apitz To: Tom Lane Cc: "David G. Johnston" , Laurenz Albe , "pgsql-general@lists.postgresql.org" Subject: Re: existing row not found by SELECT ... WHERE CTID = ? Message-ID: Reply-To: Matthias Apitz References: <1652228.1653408709@sss.pgh.pa.us> <2305902.1653580955@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2305902.1653580955@sss.pgh.pa.us> X-Operating-System: FreeBSD 13.0-CURRENT r368166 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.50.179 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk El día jueves, mayo 26, 2022 a las 12:02:35 -0400, Tom Lane escribió: > I wonder though if the > OP should be considering using SELECT FOR UPDATE in his cursor, > so that it'd automatically chain up to the newest row version. I diged into this but the CURSOR are all declared WITH HOLD and this conflicts with FOR UPDATE. And this is not easy to change in our generic generated DB-layer for all the ~400 tables. matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub