Re: pg_stat directory and pg_stat_statements

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: Tomas Vondra <tv(at)fuzzy(dot)cz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_stat directory and pg_stat_statements
Date: 2014-05-29 05:49:13
Message-ID: CAHGQGwEBA5gQ=yps4o8hhfrjEH1WissLnVcHbmJmFWBCMkd5sA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 29, 2014 at 1:01 PM, Ashesh Vashi
<ashesh(dot)vashi(at)enterprisedb(dot)com> wrote:
> On Thu, May 29, 2014 at 8:52 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>
>> On Thu, May 29, 2014 at 4:55 AM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
>> > On 28.5.2014 19:52, Fujii Masao wrote:
>> >> On Thu, May 29, 2014 at 12:37 AM, Peter Geoghegan <pg(at)heroku(dot)com>
>> >> wrote:
>> >>> On Wed, May 28, 2014 at 7:01 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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.
>
> Just curious.
> Will it work in upgrade scenario?

You're concerned about the scenario using pg_upgrade? I'm not sure the detail
of pg_upgrade. But if it doesn't work properly, we should have gotten
the trouble
when 9.3 (which pg_stat directory was introduced) was released. But I've not
heard such trouble....

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-05-29 06:02:27 Re: pg_stat directory and pg_stat_statements
Previous Message Amit Kapila 2014-05-29 04:59:08 Re: libpq: PQexec may block indefinitly