From: | Rod Taylor <rod(dot)taylor(at)gmail(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Anit Chakkarwar <anitchakkarwar(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate |
Date: | 2013-12-16 23:06:51 |
Message-ID: | CAKddOFAOJnDLM-Jde=Y_k8QK6GLVJk1fe_EQRGnYK-42zEH=5A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
It's still an interesting question.
Why doesn't truncate reset table statistic to 0? The table state prior to a
truncate shouldn't influence vacuum or necessity after the truncate.
Not that vacuuming a recently truncated table would be expensive, but
Analyze timing is a concern.
regards,
Rod
On Mon, Dec 16, 2013 at 10:50 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> Anit,
>
> * Anit Chakkarwar (anitchakkarwar(at)gmail(dot)com) wrote:
> > Now n_tup_del = 2, n_tup_ins=120, n_live_tup=20 in pg_stat_user_tables,
> but
> > how can I figure out what has happened to 98 rows?
>
> This is information for statistics- if you need an accurate count,
> you'll need to use a trigger and track that information explicitly..
> There can be other ways that n_tup_del can end up being inexact.
>
> Thanks,
>
> Stephen
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey Konoplev | 2013-12-16 23:18:14 | Re: [BUG] Segmentation fault in pfree in PLy_output_tuple_funcs |
Previous Message | Devrim GÜNDÜZ | 2013-12-16 23:05:05 | Re: BUG #8683: pg_upgrade |