Re: n_live_tup number double after migration do PG 10.4

From: Keith <keith(at)keithf4(dot)com>
To: Mai Peng <maily(dot)peng(at)webedia-group(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: n_live_tup number double after migration do PG 10.4
Date: 2018-08-05 23:51:25
Message-ID: CAHw75vtv6TuXK88K3+YoVW903YCaTSSb+StONafdAMEsSrhCKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sun, Aug 5, 2018 at 5:29 AM, Mai Peng <maily(dot)peng(at)webedia-group(dot)com>
wrote:

> Hi all,
>
> 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.
> Where do these live tuples coming from ?
>
> Thank you
>

The value stored in n_liv_tup is the value seen when the last analyze was
run on the table. It is not kept up to date on every row change and only
changes when an analyze is run again. So perhaps the tables you're
referencing hadn't been analyzed for a while before you upgraded?

Keith

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2018-08-06 04:24:28 Re: n_live_tup number double after migration do PG 10.4
Previous Message Keith 2018-08-05 20:31:41 Re: PostgreSQL 11 global index