Re: log files and permissions

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: log files and permissions
Date: 2010-07-13 01:48:59
Message-ID: AANLkTim4ljryk4wsylNlF8PAuM5SaRynKUSvFACHgJt1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 12, 2010 at 7:36 PM, Martin Pihlak <martin(dot)pihlak(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2010-07-13 02:31:16 dblink regression failure in HEAD
Previous Message Tom Lane 2010-07-13 00:12:09 Re: gSoC - ADD MERGE COMMAND - code patch submission