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 1so2JR-007oWk-8t for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2024 14:57:50 +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 1so2JQ-00EEQS-Nt for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2024 14:57:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1so2JP-00EEQJ-P2 for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2024 14:57:48 +0000 Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1so2JL-000UDg-CP for pgsql-general@postgresql.org; Tue, 10 Sep 2024 14:57:47 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id 179A311401EB; Tue, 10 Sep 2024 10:57:42 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Tue, 10 Sep 2024 10:57:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding: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=fm3; t=1725980262; x=1726066662; bh=+6uJWDdxarGYY0sW2klnMgaCRaYBo4P54zaPCkAtUoA=; b= qHc6yojCDaVACGBnJBp9Z+dQJn5Jqgmh8E7hMdc/hYJwD/n/XvZ1F9O08EL0qB1o zLuOgI63YHD7LKxQPct5DKRTUmhcaiIHDeso+2X48cwuoYAZriEpN4AKktrzYtJD 44MXEjKmo8TJXCPz8DKu4a1VbxhtZmRo55qax6TAo6e7o5zsqieou/Y0HdRKHrnO POgNB2K8yCe+xZaEomr30egzz6ZPQnv+dNFmpFEyJlfrH4LXx02ZuL2Tw6Zr4955 LHM+Ojj8ippG07yQEXelyxvurRQO9XQPTqNdhTn6uxJpU3bhvMhHmtYXng8x94g8 uIXASVdbOLHVwetHlxsZzw== 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 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1725980262; x= 1726066662; bh=+6uJWDdxarGYY0sW2klnMgaCRaYBo4P54zaPCkAtUoA=; b=a PLoReu01+7+HXlrxByqzjhsvHyKNQ+vZ/2UvWXAXJI3X9FWwlwSZYQQ2u1R5G4Hc Dm3xZrYn8W7wLwpHawsbEZAZgombmcvm7iP6OEaDnUyVU4haqzNNA5vxox5IyLjR 5SGbBQg8UYEsvOMu3jFo6nDOZE3nM5gxNJ8nAPvgBRAtc+AuuKaYNEgfKaQMtbbi 0U7Xv1ERFyQA6NwfGieHhksL966LK1lnzqPaTGVlr5t/i/v70vR+6fTXdUJ5jEdM 14+tSdEj5Y00CvgFhHbwL8Bmv4QQPQxFkidxva6Egd0Sp2CbwsSme6dpJIMb1xNw aoHw9yCogmMxcdeTiJtDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeiledgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhevhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepffevhefggfdtgfefvddt jeetteegtddtueejhfelieejheeitdejgefggeeiudfgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepfhgrsghrihgtvgeifeeikeeiudesghhmrghilhdrtghomhdprhgtphht thhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Sep 2024 10:57:41 -0400 (EDT) Message-ID: <0bd0a3be-b181-4ac7-bb9e-6ee5aec35d6c@aklaver.com> Date: Tue, 10 Sep 2024 07:57:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: infinite loop in an update statement To: Fabrice Chapuis References: <4f5c2262-f869-4707-93cb-735267903da4@aklaver.com> Content-Language: en-US Cc: pgsql-general From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/10/24 07:47, Fabrice Chapuis wrote: Reply to list also Ccing list > no trigger on theses tables > > On Mon, Sep 9, 2024 at 5:00 PM Adrian Klaver > wrote: > > On 9/9/24 07:55, Fabrice Chapuis wrote: > > Hi, > > > > table a and b are empty, this query does not return. It seems we > enter > > in infinite loop. > > why this update does not return instantly? > > > > UPDATE table_a a > >   SET col1 = (SELECT MIN(b.col1) > >                      FROM table_b b > >                      WHERE b.col2 = a.col2) > > Do you have an UPDATE trigger on table_a? > > > > > Regards, > > > > Fabrice > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com