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 1uHiiL-008BI1-0e for pgsql-admin@arkaria.postgresql.org; Wed, 21 May 2025 12:38:29 +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 1uHiiJ-006UVE-O4 for pgsql-admin@arkaria.postgresql.org; Wed, 21 May 2025 12:38:27 +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 1uHiiJ-006UV6-7j for pgsql-admin@lists.postgresql.org; Wed, 21 May 2025 12:38:27 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uHiiG-0008jv-1M for pgsql-admin@lists.postgresql.org; Wed, 21 May 2025 12:38:25 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-ad5a11c2942so239076466b.3 for ; Wed, 21 May 2025 05:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1747831102; x=1748435902; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=xx6naV8q5fNabLaNzwpLb30jyjCEomIWOv0o7h+Ptmw=; b=Ts9UbEZ2knStuQfJ1di7u3wyd2rK0wEpNEmGuUuIq+QKwLuASvVVC8uBX61r4wuVIG Lw+46iq7ao7t6x8YNSdooqX77X8SfxUtNIt1GT4HpKfj+v9/7p9Arg3dM5jkFTyhMFYb GL7CfR9gykcsO3wWvKn32KLgcYv1bJIF0Z4wWdrOhH8wQLGa9YGWUBPy3pSIdv8eYdc6 uYKmujGO0QP0Scp4ZXfWUD1/9uZ9ufmNEkdVlqLr8i2g5xvBsFamvRyfjRZyvhiUjDZu HjCkeA5on551GCOABM+DqXToj9istSbbG1lQ4VBVcBG+IoL3wK7oyY4sni5qgcGkRN6w 9twA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747831102; x=1748435902; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xx6naV8q5fNabLaNzwpLb30jyjCEomIWOv0o7h+Ptmw=; b=JEEp8E/WVfmQrkcyJguNIlJsnNWGXrwmqVXpzeBpqn8zuuE4B4408rclmIj6qua1Se Stoa9FjFsC6pX6yFt/uYeyXWwKZjCakY8tcSzAGQQE/kHKRBgxbF3+0JYghEfOznf147 gUNmma72caaH1MEKkuoyu1//EGCFLa/iaGe5b64koCrTuO64M8HJczkGUcG6FiDRXIbI 0dSP0+F2Al7pD1cY1EQ1Xb2+oyxJLPCfADfetTzvJRlO2+FlTJ1zJeEbJIWicyZiFWAU jaIhO7ccuExI5/w8MAaxFHhlkZsPasKgnWE+7SlY5MPRhb76T65tqbVUo7cRSp3ZZi0G dw9w== X-Forwarded-Encrypted: i=1; AJvYcCXMX0s0IUv9KvN19wJgVpfUbMFNRIpjvWg35+l3wwk2AGoQbb9jiZyh0l3wuALn6hsi00lUU3IGbhnSJg==@lists.postgresql.org X-Gm-Message-State: AOJu0Yx4J4qhOerpUbbKdLbi8Ia59QKdVVy8MobUFis0nR9hGYx3WH4t jVjagUQCKkm0PAXuvh4fGcNJKOciAfvXBnJo6W/VTftQDdZgYCrrgaEdQfGonOCu+PM= X-Gm-Gg: ASbGncuLhTnLHp0GsX+SDhn00BclFYSQTay40sNykXUJRre0GqpXwjA/oHuKvRhiu5x 9eVH4GZgTcbgiC+ZsfoFTwj26ghQYLNUC8ACAU0dmggf7gXjkGlXvv3951RT6rEJaXzfnHZ32Q8 PIILX5yPxtzctSqQavAmBseXkKu4zR2w0LjOnHVHDZQ1Y3aBQ7SYdpHNmjEoiTPzk1CVknQfTD9 7nzc5igMiQck7WAgUWNcecJGSrROBzF4Vruea2D0dqJcBwAtd4zdOwtMaL9ppzusQ+hCWpjsa3p W9s1DAazsl995yWusN5a3jVd67JlezzZj+HP8fmqeXBbMhuQicEYGb1XbuUpuObvIDmvOIp5G1U 3BZbypzQQr8NuNRs= X-Google-Smtp-Source: AGHT+IGTWz+7M56OJmETjIHI5NeD8gDbMLyhBEEbhzIkHZvQRheeX4vKlujGI7QvYvEWlNquGizGzw== X-Received: by 2002:a17:906:c156:b0:ad2:51d8:7931 with SMTP id a640c23a62f3a-ad536bde70emr1701186666b.21.1747831101827; Wed, 21 May 2025 05:38:21 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([88.116.133.170]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad52d04772dsm888863066b.3.2025.05.21.05.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 May 2025 05:38:21 -0700 (PDT) Message-ID: <18617cd83b190c4209a9b16597aaacbfa7ba4df8.camel@cybertec.at> Subject: Re: query hangs out From: Laurenz Albe To: =?UTF-8?Q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD_?= =?UTF-8?Q?=D0=93=D0=BB=D1=83=D1=88=D0=B0=D0=BA=D0=BE=D0=B2?= , ikramuddin , pgsql-admin@lists.postgresql.org Date: Wed, 21 May 2025 14:38:20 +0200 In-Reply-To: References: <32ad0fda77629362dbdc90136e6d5f667d496e01.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.1 (3.56.1-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-05-21 at 12:06 +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: > The problem is with only one table. >=20 > As a result, I determined that the problem is on page 5 of the table (I m= ade SELECT ctid selections until it hangs). > Then I tried to delete rows by ctid (5, 0-100) from the table until I fou= nd the problematic row. >=20 > Content through pageinspect: > # SELECT * FROM heap_page_items(get_raw_page('"InboxState"', 5)) where lp= =3D 51; > -[ RECORD 1 ]------------------------------------------------------------= ---------------------------------------------------------------------------= ---- > lp =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 51 > lp_off =C2=A0 =C2=A0 =C2=A0| 3760 > lp_flags =C2=A0 =C2=A0| 1 > lp_len =C2=A0 =C2=A0 =C2=A0| 100 > t_xmin =C2=A0 =C2=A0 =C2=A0| 136269917 > t_xmax =C2=A0 =C2=A0 =C2=A0| 66664135 > t_field3 =C2=A0 =C2=A0| 0 > t_ctid =C2=A0 =C2=A0 =C2=A0| (47,13) > t_infomask2 | 8203 > t_infomask =C2=A0| 4929 > 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| \x3e8a7c00000000000100000090877a16b4b308dd94= 60898784c4af2dab692693d29bdf78bcf5153401000000fd55f20f44ec08dd9460f88969b94= 3ab3cd8020000000000 So the tuple is frozen AND updated, with the new version at (47,13). Odd. What do you see at (47,13)? > I couldn't delete it in the standard way (delete from "InboxState" where = ctid =3D '(5,51)') - it also hangs. >=20 > But I can freeze it through pg_surgery. >=20 > # select heap_force_freeze('"InboxState"'::regclass, ARRAY['(5, 51)']::ti= d[]); >=20 > Output after freeze: > digitalarchive=3D# SELECT * FROM heap_page_items(get_raw_page('"InboxStat= e"', 5)) where lp =3D 51; > -[ RECORD 1 ]------------------------------------------------------------= ---------------------------------------------------------------------------= ---- > lp =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 51 > lp_off =C2=A0 =C2=A0 =C2=A0| 3760 > lp_flags =C2=A0 =C2=A0| 1 > lp_len =C2=A0 =C2=A0 =C2=A0| 100 > t_xmin =C2=A0 =C2=A0 =C2=A0| 2 > t_xmax =C2=A0 =C2=A0 =C2=A0| 0 > t_field3 =C2=A0 =C2=A0| 0 > t_ctid =C2=A0 =C2=A0 =C2=A0| (5,51) > t_infomask2 | 11 > t_infomask =C2=A0| 2817 > 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| \x3e8a7c00000000000100000090877a16b4b308dd94= 60898784c4af2dab692693d29bdf78bcf5153401000000fd55f20f44ec08dd9460f88969b94= 3ab3cd8020000000000 Now it is only frozen. > After that, queries to the table started to work normally. > I'll note that there are absolutely no errors in the postgres logs, check= sums are enabled, there are no errors for them either. I would still recommend a dump and restore to get rid of the data corruptio= n. > It seems that this is a bug. Possible. Yours, Laurenz Albe