Re: Skip unregistered custom kinds on stats load

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Skip unregistered custom kinds on stats load
Date: 2025-10-22 05:51:31
Message-ID: aPhw44SlbU_wFsU0@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 22, 2025 at 08:44:27AM +0300, Alvaro Herrera wrote:
> FWIW I don't necessarily agree with what Sami is proposing, but (if I
> understand the situation correctly) I think throwing away the whole
> contents of stats when a module is removed is the opposite of
> availability, as it will lead to autovacuum lacking data and thus bloat
> problems. This is of course always problematic after a crash (unless
> somebody has fixed this already?) but at least it is supposed to be a
> known issue.

A first part here is something that Bertrand Drouvot has been working
on: being able to rebuild the table stats during WAL replay requires
us to move the stats to be relfilenode-based, so as the startup could
know where to recreate some of the numbers lost during crash recovery
from WAL, giving autovacuum a safety net.

> With these custom stat kind thingies, nobody knows that this problem
> exists.

Noted.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2025-10-22 06:11:32 RE: Question for coverage report
Previous Message Tatsuo Ishii 2025-10-22 05:49:11 Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options