Re: fixing pg_ctl with relative paths

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Hari Babu <haribabu(dot)kommi(at)huawei(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fixing pg_ctl with relative paths
Date: 2013-06-25 23:32:25
Message-ID: CAK3UJRHRZQmoFkj860E79rmRm8Y=nCMTz7CZ306FXcwZVT2zew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 25, 2013 at 2:28 AM, Hari Babu <haribabu(dot)kommi(at)huawei(dot)com> wrote:
> Please find the review of the patch.

Thank you for reviewing!

> Code Review:
> ------------
> +if (orig_post_opts) {
> + post_opts = strip_datadirs(orig_post_opts);
> +}
>
> No need of "{}" as the only one statement block is present in the if block.

OK.

> + free(tmp);
>
> The above statement can be moved inside the if (*(trailing_quote + 1) !=
> '\0') {
> where it's exact usage is present.

Right.

> Testing:
> --------
> I tested this feature with different postmaster options and database folder
> names, found no problem.
>
>
> The database folder with quotes present in it is any way having problems
> with pg_ctl.
> I feel the strip_datadirs() function header explanation is providing good
> understanding.
> Overall the patch is good. It makes the pg_ctl restart functionality works
> well.

Thanks for the feedback. Attached is a rebased version of the patch
with the two small issues noted fixed.

Josh

Attachment Content-Type Size
pgctl_paths.v02.diff application/octet-stream 3.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-06-25 23:32:30 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Previous Message Noah Misch 2013-06-25 23:05:15 Re: Possible bug in CASE evaluation