From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic |
Date: | 2021-06-09 02:26:12 |
Message-ID: | CAD21AoCjhCNX2Ry7MxhxM0J0a7h3GVcd+7wuD2tsA9TWkOE+Hg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 9, 2021 at 2:17 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
> On 2021-06-08 14:27:14 +0200, Matthias van de Meent wrote:
> > heap_prune_satisfies_vacuum considers 1 more transaction to be
> > unvacuumable, and thus indeed won't vacuum that tuple that
> > HeapTupleSatisfiesVacuum does want to be vacuumed.
> >
> > The new open question is now: Why is
> > GlobalVisCatalogRels->maybe_needed < OldestXmin? IIRC
> > GLobalVisCatalogRels->maybe_needed is constructed from the same
> > ComputeXidHorizonsResult->catalog_oldest_nonremovable which later is
> > returned to be used in vacrel->OldestXmin.
>
> The horizon used by pruning is only updated once per transaction (well,
> approximately). What presumably is happening is that the retry loop is
> retrying, without updating the horizon, therefore the same thing is
> happening over and over again?
When we calculated vacrel->OldestXmin in vacuum_set_xid_limits(),
vacrel->OldestXmin and GlogalVisCatalogRels->maybe_needed must have
been the same value. That is, those were 926025113. After that,
vacrel->OldestXmin is not changed throughout lazy vacuum whereas
GlobalVisCatalogRels->maybe_needed could be updated (right?). Is there
any chance that GlobalVisCatalogRels->maybe_needed goes backward? For
example, a case like where when re-calculating
catalog_oldest_nonremovable (i.g. updating
GlobalVisCatalogRels->maybe_needed) we take a process into account who
has an old XID but was ignored last time for some reason (e.g., its
statusFlag).
Regards,
--
Masahiko Sawada
EDB: https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-06-09 02:42:08 | Re: Multiple hosts in connection string failed to failover in non-hot standby mode |
Previous Message | Kyotaro Horiguchi | 2021-06-09 02:21:55 | Re: Logical replication keepalive flood |