public inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Shinya Kato <shinya11.kato@gmail.com>
To: wenhui qiu <qiuwenhuifx@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples
Date: Tue, 4 Nov 2025 10:29:26 +0900
Message-ID: <CAOzEurT4EH-=MEWnkiOdn4_WZ85KBvgJ1LCKpg4-e6diTk0ugA@mail.gmail.com> (raw)
In-Reply-To: <CAGjGUAKFGC3BW1y1vPmL85r5mr5UWCYK6SmRSPzpHaQxFKF5gQ@mail.gmail.com>
References: <CAOzEurSgy-gDtwFmEbj5+R9PL0_G3qYB6nnzJtNStyuf87VSVg@mail.gmail.com>
<CAGjGUAKFGC3BW1y1vPmL85r5mr5UWCYK6SmRSPzpHaQxFKF5gQ@mail.gmail.com>
On Fri, Oct 31, 2025 at 5:01 PM wenhui qiu <qiuwenhuifx@gmail.com> wrote:
>
> HI
> Thank you for your path ,This path is extremely helpful.
Thank you!
> > +/*
> > + * Identifies what determined a relation's OldestXmin horizon.
> > + * Used by autovacuum to report why dead tuples were not removable.
> > + */
> > +typedef enum OldestXminSource
> > +{
> > + OLDESTXMIN_SOURCE_ACTIVE_TRANSACTION,
> > + OLDESTXMIN_SOURCE_HOT_STANDBY_FEEDBACK,
> > + OLDESTXMIN_SOURCE_PREPARED_TRANSACTION,
> > + OLDESTXMIN_SOURCE_REPLICATION_SLOT,
> > + OLDESTXMIN_SOURCE_OTHER
> > +} OldestXminSource;
> > +
> > +typedef struct OldestXminInfo
> > +{
> > + OldestXminSource source;
> > + int backend_pid;
> > +} OldestXminInfo;
> I have a question for like this
> one session
> begin;
> select * from table_a
> not commit or not closed session
> It is in OLDESTXMIN_SOURCE_ACTIVE_TRANSACTION type ?
Exactly. Looking at 010_autovacuum_oldest_xmin_reason.pl should make
it clear which logs are output in which cases. (I just noticed there
seems to be a case where the test fails. I need to fix that.)
--
Best regards,
Shinya Kato
NTT OSS Center
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-hackers@postgresql.org
Cc: shinya11.kato@gmail.com, qiuwenhuifx@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples
In-Reply-To: <CAOzEurT4EH-=MEWnkiOdn4_WZ85KBvgJ1LCKpg4-e6diTk0ugA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox