Re: Autovacuum giving up on tables after crash because of lack of stats

2025-01-03 Thread Bertrand Drouvot
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 +, Bertrand Drouvot wrote: > > > I think that replicating stats that are used by autovacuum would be an > > > additional > > > benefit, s

Re: Autovacuum giving up on tables after crash because of lack of stats

2025-01-03 Thread Andres Freund
On 2024-12-30 19:12:54 +0900, Michael Paquier wrote: > On Mon, Dec 30, 2024 at 09:44:45AM +, 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

Re: Autovacuum giving up on tables after crash because of lack of stats

2025-01-03 Thread Andres Freund
Hi, On 2024-12-25 10:10:44 +0900, Michael Paquier wrote: > While digging again into the support for pgstats flushes across > checkpoints, mainly to avoid autovacuum giving up on tables after a > crash if stats entries cannot be found, I've been reminded about this > point raised by Heikki: > https

Re: Autovacuum giving up on tables after crash because of lack of stats

2024-12-30 Thread Bertrand Drouvot
Hi, On Mon, Dec 30, 2024 at 07:12:54PM +0900, Michael Paquier wrote: > On Mon, Dec 30, 2024 at 09:44:45AM +, 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

Re: Autovacuum giving up on tables after crash because of lack of stats

2024-12-30 Thread Michael Paquier
On Mon, Dec 30, 2024 at 09:44:45AM +, 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.postgre

Re: Autovacuum giving up on tables after crash because of lack of stats

2024-12-30 Thread Bertrand Drouvot
Hi, On Wed, Dec 25, 2024 at 10:10:44AM +0900, Michael Paquier wrote: > > 2) The main issue I am trying to tackle is autovacuum giving up on > tables if there are no stats entries, so we could add *some* WAL > logging of the relation stats that are relevant for autovacuum, then > replay them. I t