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 1uxB2X-00BeRU-Dk for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Sep 2025 21:10:41 +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 1uxB2U-0040m0-LI for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Sep 2025 21:10:39 +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 1uxB2U-0040ls-Bh for pgsql-bugs@lists.postgresql.org; Fri, 12 Sep 2025 21:10:39 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uxB2R-000UFx-0G for pgsql-bugs@lists.postgresql.org; Fri, 12 Sep 2025 21:10:38 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-45ddc7d5731so17149185e9.1 for ; Fri, 12 Sep 2025 14:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1757711435; x=1758316235; 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=DzaYTrlqivK6UiC96ETOzCZ7taoIIBAm3XwIuYlYFx4=; b=O6JUp30k4QN5ZLHapi+ghSbDjKnCAkacW0l7PDmT4fiK7F1lTxLGjmSCn9efaN0AnB mpWhay1zf/reiWVsJGL+Xsqo0LU/G1iKA5u7lZug+0Vdx4KDOQ+02rak/pn6bHNUqnmW H1AmzBnh1dZGpQjsKyeaidiQrj6fHK+57FasitTBzQlgqW8NQwpIbg81vXlE045mXnUS C143QRCO0ekCVtEcI++13tAzPUWuZdm6akKjPGXwYb627UnDSrL1zpxn9hN/AI+QbU2g r+ThEuhR8cBOfB1OfVKrDB4kj8OOlo47WTbTFlMhqOyo3qkP1gJ4ZB6cEp3OYFJnPUxX QKXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757711435; x=1758316235; 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=DzaYTrlqivK6UiC96ETOzCZ7taoIIBAm3XwIuYlYFx4=; b=c28HI86wPEOgBie1UImLdIQjI8rpQG4Emkoux+LOxaOB3Jr+AmP/zPboktAcjSw1WO cMOC3ebHkJMuyOYpxeBzrH7MlwKbYIZChiWjb6peA3GDkNee5idcJoxH3YxF8CqK+m9A ZsBimW4Kk20AfLChjcq3fzaK0//TaLAYCVgN1TwAG52NrcnY0gWEozNUKOoAUVNvvTFb LhgBjK3ejiSDfwJS1lty6QkAcAfuux04mXivSDdhnadZRQkbOr/WUXoBjOWd9nihbNGe otL60aDYFvNMLLhgq64m+CMOdckgjVgKOCrEKdvn1yVho3p9fAROrpYxL0wfM9qoJzsy Zn0w== X-Forwarded-Encrypted: i=1; AJvYcCVzo2v7ewXrLKwTcrPRdbWyAkOoSqg0nLB3ge1SfUb5q1fyFdKAbdw2GDPiZgfyvdYO9QLidfYLjK+R@lists.postgresql.org X-Gm-Message-State: AOJu0Yyyw0E/WS7C4xIcYyYe8Ofqt5LyvjhFRZsL0HN5pVKdeelq1YmQ A/eshzzQ0DM/M0cmY1xW0KpHJunAjzGgH6un83Qoqx3OzuB0EXBX3BWK7OndwKoUiUM= X-Gm-Gg: ASbGnctiWkqzzrXfg+YuUdaKhmmw6+pXujo5sEC6i3LFwCG0vzQqxa8PuPTszN3bmgM BU1PeA7u/ccJq9hndEarOQfGHjEWUGHHwOo+b5eEmvDj8kimCdEUgWdjFKlDwxCBBltMPzbQKUk 4l6ps/gU0Jc456m4TzETj2ehSgpdRv3OuWtgqsTPvcESWrkmp8/giw1OF3JNEsNCCqNHn/rqiw9 22pqPvkHdjcw/lLWbCE9piNKxEPphdBqogbxz78zzajj/Zh1i+gtgnGG7DMfFRbhPQ5+cTYOcEW ZXLeCB/BFxdY9LUlsogwwHt28KwwTkHmQ2tCTX7lyjEYbrFE3YybeBnL/uVNMuYatmZCXt3cqoB 4HXHiE1lfas6SjmP9A8W/CUT1f6HniO/FNHaDXa+iVZHf5AXdc1yfe8yG7DQbWJ4= X-Google-Smtp-Source: AGHT+IFH3oQNAsgnCZRRdkOtA7PEkaSD11XRd9hLUCphEBi7KHbwwVGyuewEZva0poluoKX3GmCGvA== X-Received: by 2002:a05:6000:2002:b0:3d6:7ae1:af00 with SMTP id ffacd0b85a97d-3e7658bb48fmr4416909f8f.20.1757711435289; Fri, 12 Sep 2025 14:10:35 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:255:30a:2403:9037:2d08:c2c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3e764eacc0csm4963345f8f.18.2025.09.12.14.10.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Sep 2025 14:10:34 -0700 (PDT) Message-ID: <1d7c9fc27e3a304b1f4ba225afdfca9c3b3fb536.camel@cybertec.at> Subject: Re: ERROR: found xmin 4133102167 from before relfrozenxid 4151440783 From: Laurenz Albe To: Tushar Takate , pgsql-bugs@lists.postgresql.org Date: Fri, 12 Sep 2025 23:10:34 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-09-12 at 22:09 +0530, Tushar Takate wrote: > PostgreSQL version: 15.12 > Disk type: RAID5 > OS: RHEL 8.10 >=20 > Error/Issue :=20 >=20 > vacuumdb: error: processing of database "live_order_us_db" failed: ERROR:= =C2=A0found xmin 4133102167 from before relfrozenxid 4151440783 > > 2025-09-11 02:29:58.888 UTC,,,2362287,,68c233e1.240hbf,1,,2025-09-11 02:2= 8:49 UTC,122/46371006,0,ERROR,XX001,"found xmin 4133102167 from before relf= rozenxid 4151440783",,,,,"while scanning block 5821149 offset 5 of relation= ""public.order"" > 2025-09-11 02:40:50.361 UTC,"prod_user_ap","live_order_us_db",2375672,"12= 7.0.0.1:59344",68c2342b.243ff8,4,"VACUUM",2025-09-11 02:30:03 UTC,169/38875= 732,0,ERROR,XX001,"found xmin 4133102167 from before relfrozenxid 415144078= 3",,,,,"while scanning block 5821149 offset 5 of relation ""public.order"""= ,"VACUUM (VERBOSE, ANALYZE) public.order;",,,"vacuumdb","client backend",,-= 5528190995457849841 That is probably caused by a PostgreSQL bug; you can get rid of the message by creating the "pg_surgery" extension and running SELECT heap_force_freeze('public.order'::regclass, '{(5821149,5)}'::tid[]= ); > One more thing/observation we saw in the PostgreSQL logs : >=20 > The following message consistently appeared once a day during the past we= ek >=20 > 2025-09-10 23:33:14.469 UTC,,,157915,,68c21a46.268fb,3,,2025-09-10 23:31:= 18 UTC,45/49119328,0,WARNING,01000,"page is not marked all-visible but visi= bility map bit is set in relation ""order"" page 5815453",,,,,"while scanni= ng block 5815453 of relation ""public.order""",,,,"","autovacuum worker",,0 >=20 > What specific condition or scenario is triggering this PostgreSQL error?= =C2=A0Can it be classified > as a bug? If not, what=E2=80=99s a safe and=C2=A0efficient=C2=A0way to re= solve it without relying on a dump > and restore, particularly for large, mission-critical tables over 200GB? That is some kind of data corruption, perhaps caused by a bug, perhaps by something else. The autovacuum run should fix that problem. Yours, Laurenz Albe