Subject: vacuumdb produces ERROR: cannot freeze committed xmax

From: Sbob <[email-masked]>
Date: Wed, 12 Nov 2025 12:10:11 -0700

All;

running a vacuumdb is throwing this error on a PostgreSQL v15 db:

vacuumdb: error: processing of database "prod1" failed: ERROR: cannot 
freeze committed xmax 1406773176

Thanks in advance for any guidance

---

From: Ron Johnson <[email-masked]>
Date: Wed, 12 Nov 2025 15:19:47 -0500

> running a vacuumdb is throwing this error on a PostgreSQL v15 db:

Which *exact* version?

> freeze committed xmax 1406773176

What is the *exact* command?
Any other errors (like in the PG log file)?

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

---

From: Laurenz Albe <[email-masked]>
Date: Thu, 13 Nov 2025 09:59:40 +0100

> freeze committed xmax 1406773176

That is data corruption: VACUUM encountered a tuple with a HEAP_XMAX_INVALID
hint (which indicates the tuple is visible), but the deleting transaction
is committed.

Perhaps your commit log got corrupted.

Is that on the same system as you other report that indicates a corrupted database?
(https://postgr.es/m/0a1745be-c54d-43b9-a90f-71e4c721c17c%40quadratum-braccas.com)

Perhaps it is time to restore a good backup.

Yours,
Laurenz Albe

---

From: Fabrice Chapuis <[email-masked]>
Date: Thu, 13 Nov 2025 12:06:54 +0100

Hi,
This thread could perhaps help
PostgreSQL: ERROR: cannot freeze committed xmax
<https://www.postgresql.org/message-id/flat/8C414E45-6DD8-48E0-84B2-2D53545000D0%40gmail.com>

Regards,

Fabrice

---

From: Sbob <[email-masked]>
Date: Thu, 13 Nov 2025 10:16:54 -0700

> (https://postgr.es/m/0a1745be-c54d-43b9-a90f-71e4c721c17c%40quadratum-braccas.com)
Yes, we did a restore of the tables that seemed to be corrupted, any 
advice on determining the cause of the corruption?

---

From: Laurenz Albe <[email-masked]>
Date: Thu, 13 Nov 2025 19:29:59 +0100

> advice on determining the cause of the corruption?

Investigate what odd things you did with the database.

In my experience, the main causes for corruption are:

- shoddy or old hardware

- bad administration (e.g., badly taken backups)

- software bugs

Yours,
Laurenz Albe