Re: Why isn't stats_temp_directory automatically created?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Euler Taveira de Oliveira <euler(at)timbira(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why isn't stats_temp_directory automatically created?
Date: 2009-04-19 16:29:00
Message-ID: 49EB514C.4020809@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao wrote:
> Hi,

Hi!

Sorry about the very late response - I've been out of the country and
generally busy.

>
> On Wed, Apr 15, 2009 at 5:37 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> This does not take into account the effect of symlinks as mentioned by
>> Itakagi Takahiro. I haven't looked at the details, but I don't think it
>> would be that much more work to deal with it - and as he mentions, this
>> is a very common usecase.
>
> Okey, I'll revise the patch; create also the directory which is
> referenced by symlink if not present.

Great.

>> Also, wouldn't it be better to isolate this to the first time when we
>> try to create the file - then we don't have to export the symbol?
>
> You mean having assign_pgstat_temp_directory() create the
> directory instead of pgstat_start()? In this case, the directory is
> created automatically not only at the beginning but also when
> a configuration file is reloaded. This seems to be better behavior.

No, I meant creating it when we open the file - in pgstat_write_statsfile().

//Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-19 16:42:44 Re: Replacing plpgsql's lexer
Previous Message Tom Lane 2009-04-19 15:54:45 Re: Unicode support