From: Tom Lane <tgl@sss.pgh.pa.us>
To: Keith <keith@keithf4.com>
Cc: Mai Peng <maily.peng@webedia-group.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: n_live_tup number double after migration do PG 10.4
Date: Mon, 06 Aug 2018 00:24:28 -0400
Message-ID: <1639.1533529468@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHw75vtv6TuXK88K3+YoVW903YCaTSSb+StONafdAMEsSrhCKQ@mail.gmail.com>
References: <ED28CE05-4A54-42D5-84D3-35B4C84BA540@webedia-group.com>
<CAHw75vtv6TuXK88K3+YoVW903YCaTSSb+StONafdAMEsSrhCKQ@mail.gmail.com>
Keith <keith@keithf4.com> writes:
> On Sun, Aug 5, 2018 at 5:29 AM, Mai Peng <maily.peng@webedia-group.com>
> wrote:
>> After the migration to pg 10 by pg_upgrade and vacuumdb, I’ve seen the
>> number of live tuple double and performance decreases on few queries.
> The value stored in n_liv_tup is the value seen when the last analyze was
> run on the table.
No, you're confusing this with pg_class.reltuples. I think the OP is
talking about pg_stat counters such as pg_stat_all_tables.n_live_tup.
Those should update after every transaction, although there are various
reasons why they might be inaccurate.
The OP hasn't given us nearly enough information to speculate usefully
on what he's seeing. I'd suggest reading
https://wiki.postgresql.org/wiki/Guide_to_reporting_problems
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, keith@keithf4.com, maily.peng@webedia-group.com
Subject: Re: n_live_tup number double after migration do PG 10.4
In-Reply-To: <1639.1533529468@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