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 1uIMFq-002x0I-Hy for pgsql-admin@arkaria.postgresql.org; Fri, 23 May 2025 06:51:42 +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 1uIMFo-00FlB7-ML for pgsql-admin@arkaria.postgresql.org; Fri, 23 May 2025 06:51:40 +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 1uIMFo-00FlAy-8x for pgsql-admin@lists.postgresql.org; Fri, 23 May 2025 06:51:40 +0000 Received: from mail-yb1-xb2e.google.com ([2607:f8b0:4864:20::b2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uIMFl-000TOC-2G for pgsql-admin@lists.postgresql.org; Fri, 23 May 2025 06:51:39 +0000 Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-e7b9972069dso5347269276.3 for ; Thu, 22 May 2025 23:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747983096; x=1748587896; 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=aPgLev/QIoxHNCQEEykv6TxIv2nv56grU2ZAso8StqE=; b=CyislR9T+U40tDHpjtHm99QkyL3riHELm5GS6hqRBi/sZZfFUDkdgnYmLfvTI1XRw5 3gVdXaenaswLS6osEaqPXTYs4h/R4ovIEOhXiLQfIMPtP68uHNNJniptUtrT8WH6iWlq LoYd9vHpV8VPmeNdGFV3f6GbVLX8T7vlqTN+FVd0PC6RpnGK6z90trHlc5jHkWlUTz8D bLTwIAdtdAKH2Oeh1likG3SczFfpjpKVpQikEeu6L4reB8dzaRK+emcFEj/GauU+vBMC mqfk3f2ddJpey9kKtuXFvgaViImo2WJzm71M0Ku8XEULbsJk1YS2kLjC/7usYKjgH3bs Vuaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747983096; x=1748587896; 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=aPgLev/QIoxHNCQEEykv6TxIv2nv56grU2ZAso8StqE=; b=cK44Fo88B1PNATIKmWTP5mepT3Q/TBwhVXjppqgLEpqQ5hI26NQcpSv8YJKY4uyyw/ S6yWlMfEbMomJ85hIE7/IPJYF0i2xAg/jeJpkC9xJqLzyY8bDIkeEPBaziftSi6OsHo3 HbMPL4Fkvkljvk+9O7WB01uRITMJWaXJJDq9nNu60KFAvbgzN9rAwrA2PJSxCWAhLH4o 5LaRmRRgY9XWofvMo/xAQb4WnhU6GU21l4gwqM+4DscwhaZgGUtIS1QrnqmEnFjtHleO pGpJURAmBswJ2gN4H8jJiJp7fRa6hd8fhS8T6SbU/Z8IGgXophBcZQ6E6VIzZ9NyzKol ml4g== X-Forwarded-Encrypted: i=1; AJvYcCUz6fVnL3ZzzNbRR4k2le6tFp/gACSUQFPJ4Un++K/MqMwCzILVWIFl21cnjbMJYklKeVs2ZcJJKUk3CA==@lists.postgresql.org X-Gm-Message-State: AOJu0Yx92EusOrXYbpSMpCPCNc04NSfN/mBSjrTU7au5suQqM/O23HG1 zvLmwyZ3y7zWV4y5pdbdmg/ujjpvlQADNS/0EJXmKlFqCv78jJYWS5U4qRFf9kGEl1ihRiRAajd G2h0AcSV6S0enmLxUUf4yZm8TzA46xJ0= X-Gm-Gg: ASbGnctdd91fpVGLUUHm3gig76ufuFICdK6oV7Q1FYk3dO+Np9V3MWeot8J/RoeYK1D Q4x6evFS+7pxGCPhmVpejk9f1KnhdtmDn7cJ5Vdwx5zSf5oUfQ1thYyowvbi689/BWxdge22mUV rB+3FwVyb5e771xGuZ6OcmwR2x0qSkNoGd X-Google-Smtp-Source: AGHT+IF5G2x5bMgQoth7qiSDQoZrz0PHllpxpwRSc3oEqOtKLcSOw0bIGeMSBadJd3mt9iDeG6BEHHagr+JJcWuUM0E= X-Received: by 2002:a05:6902:1004:b0:e7d:702d:9347 with SMTP id 3f1490d57ef6-e7d7e198fa6mr2514260276.38.1747983095888; Thu, 22 May 2025 23:51:35 -0700 (PDT) MIME-Version: 1.0 References: <32ad0fda77629362dbdc90136e6d5f667d496e01.camel@cybertec.at> <18617cd83b190c4209a9b16597aaacbfa7ba4df8.camel@cybertec.at> <1ceba18088383dd1a3cfc3d8dcf4a12615609b2f.camel@cybertec.at> In-Reply-To: <1ceba18088383dd1a3cfc3d8dcf4a12615609b2f.camel@cybertec.at> From: =?UTF-8?B?0JDQvdGC0L7QvSDQk9C70YPRiNCw0LrQvtCy?= Date: Fri, 23 May 2025 09:51:15 +0300 X-Gm-Features: AX0GCFsrjLLGCt0__mKffoiI0k_pI9OlYtEzYI8cfKpJ8ABMG-8bfBHTR6MBZJw Message-ID: Subject: Re: query hangs out To: Laurenz Albe Cc: ikramuddin , pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000081047a0635c8076a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000081047a0635c8076a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you. I have investigated the logs to find the cause. The only thing I found is that the problem started after a failover (we use patroni with synchronous replication). The problem is unlikely on the hardware level, since we use a private cloud with enterprise-level hardware, and the checksum verification in postgres did not find any problems. If this is a bug in postgres, and hackers are willing to investigate the problem, I can provide an archive with pgdata =D1=81=D1=80, 21 =D0=BC=D0=B0=D1=8F 2025=E2=80=AF=D0=B3. =D0=B2 18:09, Laur= enz Albe : > On Wed, 2025-05-21 at 16:27 +0300, =D0=90=D0=BD=D1=82=D0=BE=D0=BD =D0=93= =D0=BB=D1=83=D1=88=D0=B0=D0=BA=D0=BE=D0=B2 wrote: > > > What do you see at (47,13)? > > > > I have restored the data before the freeze, here is the content (47.13) > > SELECT * FROM heap_page_items(get_raw_page('"InboxState"', 47)) where l= p > =3D 13; > > -[ RECORD 1 > ]------------------------------------------------------------------------= ------------------------------------------------------------------- > > lp | 13 > > lp_off | 4632 > > lp_flags | 1 > > lp_len | 100 > > t_xmin | 136385644 > > t_xmax | 136385520 > > t_field3 | 0 > > t_ctid | (47,13) > > t_infomask2 | 11 > > t_infomask | 8337 > > t_hoff | 32 > > t_bits | 1111011000000000 > > t_oid | > > t_data | > \x3e8a7c00000000000100000090877a16b4b308dd9460898784c4af2dab692693d29bdf7= 8bcf5153401000000ad43d6a5273608dd947a749769b943ab3cd8020001000000 > > That tuple should be visible. > > So I'd say you should killed the other tuple with heap_force_kill(). > > Yours, > Laurenz Albe > --00000000000081047a0635c8076a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you.
I have investigated the logs to find the cau= se.
The only thing I found is that the problem started after a failover = (we use patroni with synchronous replication).
The problem is unlikely o= n the hardware level, since we use a private cloud with enterprise-level ha= rdware, and the checksum verification in postgres did not find any problems= .
If this is a bug in postgres, and hackers are willing to investigate t= he problem, I can provide an archive with pgdata

=D1= =81=D1=80, 21 =D0=BC=D0=B0=D1=8F 2025=E2=80=AF=D0=B3. =D0=B2 18:09, Laurenz= Albe <laurenz.albe@cybertec= .at>:
On = Wed, 2025-05-21 at 16:27 +0300, =D0=90=D0=BD=D1=82=D0=BE=D0=BD =D0=93=D0=BB= =D1=83=D1=88=D0=B0=D0=BA=D0=BE=D0=B2 wrote:
> > What do you see at (47,13)?
>
> I have restored the data before the freeze, here is the content (47.13= )
> SELECT * FROM heap_page_items(get_raw_page('"InboxState"= ', 47)) where lp =3D 13;
> -[ RECORD 1 ]---------------------------------------------------------= ---------------------------------------------------------------------------= -------
> lp =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 13
> lp_off =C2=A0 =C2=A0 =C2=A0| 4632
> lp_flags =C2=A0 =C2=A0| 1
> lp_len =C2=A0 =C2=A0 =C2=A0| 100
> t_xmin =C2=A0 =C2=A0 =C2=A0| 136385644
> t_xmax =C2=A0 =C2=A0 =C2=A0| 136385520
> t_field3 =C2=A0 =C2=A0| 0
> t_ctid =C2=A0 =C2=A0 =C2=A0| (47,13)
> t_infomask2 | 11
> t_infomask =C2=A0| 8337
> t_hoff =C2=A0 =C2=A0 =C2=A0| 32
> t_bits =C2=A0 =C2=A0 =C2=A0| 1111011000000000
> t_oid =C2=A0 =C2=A0 =C2=A0 |
> t_data =C2=A0 =C2=A0 =C2=A0| \x3e8a7c00000000000100000090877a16b4b308d= d9460898784c4af2dab692693d29bdf78bcf5153401000000ad43d6a5273608dd947a749769= b943ab3cd8020001000000

That tuple should be visible.

So I'd say you should killed the other tuple with heap_force_kill().
Yours,
Laurenz Albe
--00000000000081047a0635c8076a--