Re: log files and permissions - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: log files and permissions
Date
Msg-id AANLkTim4ljryk4wsylNlF8PAuM5SaRynKUSvFACHgJt1@mail.gmail.com
Whole thread Raw
In response to Re: log files and permissions  (Martin Pihlak <martin.pihlak@gmail.com>)
Responses Re: log files and permissions
List pgsql-hackers
On Mon, Jul 12, 2010 at 7:36 PM, Martin Pihlak <martin.pihlak@gmail.com> wrote:
> Itagaki Takahiro wrote:
>> I checked "log_file_mode GUC" patch, and found a couple of Windows-specific
>> and translation issues.
>
> Thank you for the review. Attached patch attempts to fix these issues.

> +    if (!*value || *endptr || file_mode < 0 || file_mode > 0777)
> +    {
> +        ereport(GUC_complaint_elevel(source),
> +                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> +                 errmsg("invalid value for parameter \"log_file_mode\"")));

The sticky bit cannot be set via log_file_mode. Is this intentional?

> +#ifndef WIN32
> +        chmod(filename, Log_file_mode);
> +#endif

Don't we need to check the return value of chmod()?

> +const char *assign_log_file_mode(const char *value,
> +                            bool doit, GucSource source);
> +const char *show_log_file_mode(void);

You forgot to write the show_log_file_mode()? I was not able to find that
in the patch.

Regards,

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: gSoC - ADD MERGE COMMAND - code patch submission
Next
From: Itagaki Takahiro
Date:
Subject: dblink regression failure in HEAD