Re: clog segment truncation

From: Smolkin Grigory <smallkeen(at)gmail(dot)com>
To: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: clog segment truncation
Date: 2025-11-10 14:35:02
Message-ID: CAMp+ueZecSQBFx5f_+hpFoHFmew7mezk+ANhwW8-g06jZLkVzw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On Mon Nov 10, 2025 at 9:29 AM -03, Smolkin Grigory wrote:
> > Hello, hackers!
> >
> > I`m currently investigating the case of one of our PostgreSQL instance
> > having started issuing error messages about missing clog segment:
> > ERROR: could not access status of transaction 1550558894
> > DETAIL: Could not open file "pg_xact/05C6": No such file or directory.
> >
> Is this error happening with the LISTEN/NOTIFY? There is a discussion
> going on [1] that aims to fix this issue for the LISTEN/NOTIFY.

No, LISTEN/NOTIFY are not used.

So do you have a step by step to reproduce the issue?

Unfortunately, no.

> Or at least some more information about what the server was running that
> caused the
> error?

By the looks of it, nothing special, really, just plain inserts and
occasional index-scan reads (tuple (5456224,2) looks like it was read by
index-scan, because it has HEAP_XMIN_COMMITTED stamped on).
Instance wasn't subjected to power outages, kernel crashes
or hardware issues.

On Mon, Nov 10, 2025 at 4:43 PM Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
wrote:

> On Mon Nov 10, 2025 at 9:29 AM -03, Smolkin Grigory wrote:
> > So is it possible that either all_frozen bit was set incorrectly or
> wansn't
> > unset when tuples were created?
> > I will be happy to provide any additional information if required.
> > PostgreSQL version: 15.6, data_checksums: on
> >
> Actually the 15.6 is quite old.
>

It is, but I didn't see any fixes that can possibly be related to this
case, but maybe I've missed something.

>
> I didn't find any specific release note about clog truncation but you
> are missing some important fixes though.
>
> There is this fix [1] on 15.8 but I'm not sure if it's fully related
> with your issue faced here.
>
> [1]
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c809a2b2d
>
> Looks like it is more about multi-xact truncation, so I'm also not sure.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2025-11-10 15:22:11 BUG #19109: catalog lookup with the wrong snapshot during logical decoding causes coredump
Previous Message Matheus Alcantara 2025-11-10 13:43:47 Re: clog segment truncation