From: Tom Lane <tgl@sss.pgh.pa.us>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: incoherent dead tuples between pg_stat_user_tables and pgstattuple?
Date: Fri, 27 Sep 2019 10:43:03 -0400
Message-ID: <30297.1569595383@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKoxK+5YZMZZjt7kY0yqLE2J6+nrAE7BDE_BNYnfnvHP5e9qsg@mail.gmail.com>
References: <CAKoxK+4guWzkhxgzrr5G5WfB+sHwbKc8DJdVaOsO9mVgU92f2Q@mail.gmail.com>
<20077.1569592342@sss.pgh.pa.us>
<CAKoxK+5YZMZZjt7kY0yqLE2J6+nrAE7BDE_BNYnfnvHP5e9qsg@mail.gmail.com>
Luca Ferrari <fluca1978@gmail.com> writes:
> On Fri, Sep 27, 2019 at 3:52 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> n_live_tup/n_dead_tup should not be thought to be better than
>> approximations. Most operations adjust them only incrementally,
>> and messages to the stats collector can get dropped entirely
>> under heavy load, causing deltas to go missing. There are
>> also race conditions involved in some update scenarios.
> Are you suggesting tha autovacuum made free space available so that
> pg_stat_user_tables lags behind? Because I don't see last_autovacuum
> changing in the mantime.
I'm not suggesting any specific scenario, because you haven't presented
any evidence as to when those counts became off. I'm just saying that
there are plenty of possible mechanisms for them to become so.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, fluca1978@gmail.com
Subject: Re: incoherent dead tuples between pg_stat_user_tables and pgstattuple?
In-Reply-To: <30297.1569595383@sss.pgh.pa.us>
References: <CAKoxK+4guWzkhxgzrr5G5WfB+sHwbKc8DJdVaOsO9mVgU92f2Q@mail.gmail.com> <20077.1569592342@sss.pgh.pa.us> <CAKoxK+5YZMZZjt7kY0yqLE2J6+nrAE7BDE_BNYnfnvHP5e9qsg@mail.gmail.com> <30297.1569595383@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox