Re: Autovacuum giving up on tables after crash because of lack of stats - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Autovacuum giving up on tables after crash because of lack of stats
Date
Msg-id Z3gL4wGgNKSUTwU6@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Autovacuum giving up on tables after crash because of lack of stats  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Fri, Jan 03, 2025 at 09:47:58AM -0500, Andres Freund wrote:
> On 2024-12-30 19:12:54 +0900, Michael Paquier wrote:
> > On Mon, Dec 30, 2024 at 09:44:45AM +0000, Bertrand Drouvot wrote:
> > > I think that replicating stats that are used by autovacuum would be an additional
> > > benefit, so +1 for the idea number 2). This is an "issue" that has been raised
> > > multiple times (like in [1]). 
> > > 
> > > [1]: https://www.postgresql.org/message-id/20240607033806.6gwgolihss72cj6r%40awork3.anarazel.de
> > 
> > Yeah, I recall reading this one.  A colleague has poked me about doing
> > something here a few weeks ago, as well, and only flushing the stats
> > at redo was not enough while being full of holes.
> 
> Good then that I was not at all proposing to only flush the stats at redo?

Yeah, reading your comment in [1] I also think that re-assembling the stats during
WAL replay based on the relfilenode activity is the way to go.

[1]: https://www.postgresql.org/message-id/xvetwjsnkhx2gp6np225g2h64f4mfmg6oopkuaiivrpzd2futj%40pflk55su36ho

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Regina Obe
Date:
Subject: Re: Exporting float_to_shortest_decimal_buf(n) with Postgres 17 on Windows
Next
From: Bertrand Drouvot
Date:
Subject: Re: relfilenode statistics