pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tushar Takate <tushar11.takate@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: ERROR: found xmin 4133102167 from before relfrozenxid 4151440783
Date: Fri, 12 Sep 2025 23:10:34 +0200
Message-ID: <1d7c9fc27e3a304b1f4ba225afdfca9c3b3fb536.camel@cybertec.at> (raw)
In-Reply-To: <CAE4W+SLbLuis0B4mVKaCEYmxcf4C0UHo_UQeRF6ScPqfS24j5Q@mail.gmail.com>
References: <CAE4W+SLbLuis0B4mVKaCEYmxcf4C0UHo_UQeRF6ScPqfS24j5Q@mail.gmail.com>

On Fri, 2025-09-12 at 22:09 +0530, Tushar Takate wrote:
> PostgreSQL version: 15.12
> Disk type: RAID5
> OS: RHEL 8.10
> 
> Error/Issue : 
> 
> vacuumdb: error: processing of database "live_order_us_db" failed: ERROR:  found xmin 4133102167 from before relfrozenxid 4151440783
>
> 2025-09-11 02:29:58.888 UTC,,,2362287,,68c233e1.240hbf,1,,2025-09-11 02:28:49 UTC,122/46371006,0,ERROR,XX001,"found xmin 4133102167 from before relfrozenxid 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,"127.0.0.1:59344",68c2342b.243ff8,4,"VACUUM",2025-09-11 02:30:03 UTC,169/38875732,0,ERROR,XX001,"found xmin 4133102167 from before relfrozenxid 4151440783",,,,,"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 :
> 
> The following message consistently appeared once a day during the past week
> 
> 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 visibility map bit is set in relation ""order"" page 5815453",,,,,"while scanning block 5815453 of relation ""public.order""",,,,"","autovacuum worker",,0
> 
> What specific condition or scenario is triggering this PostgreSQL error? Can it be classified
> as a bug? If not, what’s a safe and efficient way to resolve 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





view thread (6+ messages)  latest in thread

Message-ID: <1d7c9fc27e3a304b1f4ba225afdfca9c3b3fb536.camel@cybertec.at>
Permalink:  ../1d7c9fc27e3a304b1f4ba225afdfca9c3b3fb536.camel@cybertec.at/
Also on:    postgresql.org/message-id/1d7c9fc27e3a304b1f4ba225afdfca9c3b3fb536.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: laurenz.albe@cybertec.at, tushar11.takate@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: ERROR: found xmin 4133102167 from before relfrozenxid 4151440783
  In-Reply-To: <1d7c9fc27e3a304b1f4ba225afdfca9c3b3fb536.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox