Re: pg_stat directory and pg_stat_statements - Mailing list pgsql-hackers

From Shigeru Hanada
Subject Re: pg_stat directory and pg_stat_statements
Date
Msg-id CAEZqfEc2XrUgvFhM=7w9XsSOgK=LgXEiFVjObWaXV1XToFBvDg@mail.gmail.com
Whole thread Raw
In response to Re: pg_stat directory and pg_stat_statements  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: pg_stat directory and pg_stat_statements  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii-san,

I agree not to backpatch, but I noticed that the 9.3 document about
stats collector doesn't mention $PGDATA/pg_stat.

http://www.postgresql.org/docs/current/static/monitoring-stats.html

It just says:
> When the server shuts down, a permanent copy of the statistics data is stored in the global subdirectory, so that
statisticscan be retained across server restarts.
 

I'm not sure whether we should modify the 9.3 document at the moment,
but actually the description made me confused a bit.


2014-05-29 12:22 GMT+09:00 Fujii Masao <masao.fujii@gmail.com>:
> On Thu, May 29, 2014 at 4:55 AM, Tomas Vondra <tv@fuzzy.cz> wrote:
>> On 28.5.2014 19:52, Fujii Masao wrote:
>>> On Thu, May 29, 2014 at 12:37 AM, Peter Geoghegan <pg@heroku.com> wrote:
>>>> On Wed, May 28, 2014 at 7:01 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>>>>> But pg_stat_statements file is saved under $PGDATA/global yet.
>>>>> Is this intentional or just oversight?
>>>>
>>>>
>>>> I think it's an oversight.
>>>
>>> OK, patch attached.
>>>
>>> I'm afraid that it's not okay to change the file layout in $PGDATA at this beta1
>>> stage because that change basically seems to need initdb. Otherwise something
>>> like "no such file or directory" error can happen. But in this case what we need
>>> to change is only the location of the pg_stat_statements permanent stats file.
>>> So, without initdb, the server will not be able to find the
>>> pg_stat_statements stats
>>> file, but this is not so harmful. Only the problem is that the
>>> pg_stat_statements
>>> stats which were collected in past would disappear. OTOH, the server can keep
>>> running successfully from then and no critical data will not
>>> disappear. Therefore
>>> I think we can commit this patch even at beta1. Thought?
>>
>> For HEAD, probably yes. But what about backpatching 9.3?
>
> I think No. So we should not backpatch this to 9.3.
>
> Regards,
>
> --
> Fujii Masao
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers



-- 
Shigeru HANADA



pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: postgresql.auto.conf read from wrong directory
Next
From: xbzhang
Date:
Subject: Re: How to implement the skip errors for copy from ?