Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic

Поиск
Список
Период
Сортировка
От Matthias van de Meent
Тема Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic
Дата
Msg-id CAEze2WgHq8QBBF=_AT5WrR5Mprs5gnv3n96gLFO6y15fPC_xMQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Wed, 9 Jun 2021 at 20:45, Andres Freund <andres@anarazel.de> wrote:
>
> Specifically, the issue is that it uses the innocuous looking
>
>         else if (RelationIsAccessibleInLogicalDecoding(rel))
>                 return horizons.catalog_oldest_nonremovable;
>
> but that's not sufficient, because
>
> #define RelationIsAccessibleInLogicalDecoding(relation) \
>         (XLogLogicalInfoActive() && \
>          RelationNeedsWAL(relation) && \
>          (IsCatalogRelation(relation) || RelationIsUsedAsCatalogTable(relation)))
>
> it is never true if wal_level < logical. So what it is missing is the
> IsCatalogRelation(rel) || bit.

Correct.

> > The attached patch fixes this inconsistency
>
> I think I prefer applying the fix and the larger changes separately.

Feel free to change anything in that patch, it was a prototype, or
give me a notice if you want me to split the patch.

> > Another approach might be changing GlobalVisTestFor(rel) instead to
> > reflect the conditions in GetOldestNonRemovableTransactionId.
>
> No, that'd not be correct, afaict.

Allright, I wasn't sure of that myself.

With regards,

Matthias van de Meent.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: "an SQL" vs. "a SQL"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: "an SQL" vs. "a SQL"