Re: No stats after promoting standby?

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Don Seiler <don(at)seiler(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Adrien Nayrat <adrien(dot)nayrat(at)dalibo(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: No stats after promoting standby?
Date: 2017-12-15 21:15:04
Message-ID: CAECtzeXKhxN3A2r_AofPy_TZK_-N69TwuPAHHOEnPj=rcwVv3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm pretty late on this, but as it seems you didn't get any answer...

2017-12-04 23:49 GMT+01:00 Don Seiler <don(at)seiler(dot)us>:

> On Mon, Dec 4, 2017 at 4:36 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> wrote:
>
>> The optimizer stats are not lost on crash or promote actually; these are
>> stored in pg_statistic (not in the stats collector) and *are* part of
>> regular "data".
>>
>> ...
>>
>> I think it's pretty common misunderstanding -- it's not easy to see the
>> boundary between pg_statistic and pg_stat_* tables.
>
>
> Thanks for this. I thought I remembered being corrected on this before
> (probably on this very list) and just came to think of it at the end of my
> last message.
>
> So what, exactly ARE the pg_stat_* tables?
>

Activity statistics, collected by the stats collector process.

Is that the data stored in the files in stats_temp_directory?
>

Yes.

How do they differ from pg_statistic?
>
>
Those in pg_statistic are data statistics. They're used by the planner, and
collected by the ANALYZE SQL command.

I've found this blog post that seems to answer that question with a "Yes":
> https://blog.pgaddict.com/posts/the-two-kinds-of-stats-in-postgresql
>
>
+1

--
Guillaume.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Debraj Manna 2017-12-16 16:15:11 Postgres 10 shutting down on installation in Ubuntu 14
Previous Message Magnus Hagander 2017-12-14 15:50:54 Re: virtualized snapshots and PITR