Re: [tiny doc fix] statistics are not retained across immediate shutdown

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [tiny doc fix] statistics are not retained across immediate shutdown
Date: 2013-09-05 03:04:42
Message-ID: CAHGQGwHmhckhzhv1Yr9-+dJ9AvaWnTYFjZGVjffoNhA1Cc8goQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 4, 2013 at 11:56 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> On 2013-09-04 10:53:19 -0400, Tom Lane wrote:
>> "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> writes:
>> > I propose a tiny fix to clarify this. Please find the attached patch.
>>
>> That's not an accurate description of what happens, though.
>> AFAIR, we do not throw away pg_stats files as a result of recovery.
>
> StartupXLOG() does a pgstat_reset_all() in the if (InRecovery) branch.

Yes. And this causes one problem that the statistics data would be reset
at the start after the clean shutdown of the standby server.

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message wangshuo 2013-09-05 03:07:43 Re: Is it necessary to rewrite table while increasing the scale of datatype numeric???
Previous Message Quan Zongliang 2013-09-05 03:02:47 Re: improve Chinese locale performance