Re: n_mod_since_analyze isn't reset at table truncation

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: n_mod_since_analyze isn't reset at table truncation
Date: 2021-03-05 17:13:28
Message-ID: 20210305171328.czmgwdwq7y7ujkb6@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 05, 2021 at 10:43:51PM +0900, Masahiko Sawada wrote:
>
> I think we can use n_live_tup for that but since it's an estimation
> value it doesn't necessarily have the same result as DELETE and I'm
> not sure it's reliable.

I agree that it's not 100% reliable, but in my experience those estimates are
quite good and of the same order of magnitude, which should be enough for this
use case. It will be in any case better that simply keeping the old value, and
I doubt that we can do better anyway.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-03-05 17:16:37 Re: [PoC] Non-volatile WAL buffer
Previous Message David Steele 2021-03-05 17:00:20 Re: Allow an alias to be attached directly to a JOIN ... USING