Re: Why isn't stats_temp_directory automatically created?

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
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-16 05:25:31
Message-ID: 3f0b79eb0904152225h59a1c6e5p53873bf2c598a23@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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.

> 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.

One problem of this is that some directories may be created
unexpectedly if stats_temp_directory is specified at multiple
locations. It's because assign_hook is called for each setting.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2009-04-16 06:31:48 Re: New trigger option of pg_standby
Previous Message Simon Riggs 2009-04-16 05:12:10 Re: [GENERAL] Performance of full outer join in 8.3