Re: uncommitted xmin 3100586 from before xid cutoff 10339367 needs to be frozen - Mailing list pgsql-general

From Vijaykumar Jain
Subject Re: uncommitted xmin 3100586 from before xid cutoff 10339367 needs to be frozen
Date
Msg-id CAM+6J97GaSqQL0WN29CR_gB6YCQ1x7eA5hC3CuJLTs=+ug29dQ@mail.gmail.com
Whole thread Raw
In response to Re: uncommitted xmin 3100586 from before xid cutoff 10339367 needs to be frozen  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: uncommitted xmin 3100586 from before xid cutoff 10339367 needs to be frozen
List pgsql-general


On Fri, 22 Mar 2024 at 15:39, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Fri, 2024-03-22 at 13:41 +0530, Daulat wrote:
> We are unable to take the backup of our database. While taking backup we are getting the same error. 
>
> psql: error: connection to server at "localhost" (::1), port 5014 failed: FATAL:  pg_attribute catalog is missing 1 attribute(s) for relation OID 2662

Then you got severe data corruption.  This is the index "pg_class_oid_index",
and corrupted metadata make recovery difficult.

If I were you, I would seek professional help.
But first, stop working with this database immediately.
Stop the server and take a backup of all the files in the data
directory.

Do we have an option that op has a replica running and the bug has not propagated to the replica , and the op can failover/ take a backup off the replica.
i mean i could simulate a corruption of pg_catalog on my local vm using dd, but ofc that is hardware level corruption that did not propagate to the replica, so i could failover and backup from the replica just fine.
PS : if the bug propagates to the replica or does corruption on the replica too, then idk the solution. if you could login and get the oid of the objects (and have field types ready externally), then you can run a pg_filedump and copy the data.

i tried an example, but i had a lot of info for that.
corruption demo for blogs. (github.com)  (if you dont understand this, then ignore) 
 
Vijay

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: pg_locks-exclusivelock for select queries
Next
From: ushi
Date:
Subject: PostgreSQL as advanced job queuing system