Re: n_live_tup number double after migration do PG 10.4 - Mailing list pgsql-admin

From Tom Lane
Subject Re: n_live_tup number double after migration do PG 10.4
Date
Msg-id 1639.1533529468@sss.pgh.pa.us
Whole thread Raw
In response to Re: n_live_tup number double after migration do PG 10.4  (Keith <keith@keithf4.com>)
Responses Re: n_live_tup number double after migration do PG 10.4  (Mai Peng <maily.peng@webedia-group.com>)
List pgsql-admin
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


pgsql-admin by date:

Previous
From: Keith
Date:
Subject: Re: n_live_tup number double after migration do PG 10.4
Next
From: Mariel Cherkassky
Date:
Subject: Re: PostgreSQL 11 global index