Re: Why isn't stats_temp_directory automatically created?

Поиск
Список
Период
Сортировка
Искать

Re: Why isn't stats_temp_directory automatically created?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Bruce Momjian <bruce@momjian.us>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Bruce Momjian <bruce@momjian.us>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:

Why isn't stats_temp_directory automatically created?

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
Hi,

On Tue, Apr 14, 2009 at 10:26 PM, Euler Taveira de Oliveira
 wrote:
> Fujii Masao escreveu:
>>
>> Is it worth making the patch which creates stats_temp_directory
>> if not present?
>>
> +1.

Here is the patch.

This patch should be added to CommitFest-2009-First?,
or committed before 8.4 release? The patch is very small,
so I don't think that it'll block 8.4 release.

Regards,

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

Re: Why isn't stats_temp_directory automatically created?

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
Hi,

On Mon, Apr 20, 2009 at 1:29 AM, Magnus Hagander  wrote:
> Sorry about the very late response - I've been out of the country and
> generally busy.

Thanks for taking the time to comment!

>> On Wed, Apr 15, 2009 at 5:37 PM, Magnus Hagander  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.

Here is the revised patch; If stats_temp_directory indicates the symlink,
we pursue the chain of symlinks and create the referenced directory.

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

OK, I changed the patch so. Thanks.

Regards,

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

Re: Why isn't stats_temp_directory automatically created?

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
Hi,

On Tue, Apr 21, 2009 at 4:33 PM, Fujii Masao  wrote:
> Here is the revised patch; If stats_temp_directory indicates the symlink,
> we pursue the chain of symlinks and create the referenced directory.

BTW, this patch is useful also as the foundation for improving
creation of log_directory. Attached patch fixes the following
problem of log_directory by using that fundamental patch.

- log_directory is not created when a configuration file is reloaded
- creation of log_directory fails if the parent directory of it doesn't exist
- if log_directory indicates the symlink, it's not resolved

Regards,

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

Re: Why isn't stats_temp_directory automatically created?

От:
Euler Taveira de Oliveira <euler@timbira.com>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Magnus Hagander <magnus@hagander.net>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Magnus Hagander <magnus@hagander.net>
Дата:

Re: Why isn't stats_temp_directory automatically created?

От:
Magnus Hagander <magnus@hagander.net>
Дата:
FAQ