Re: BUG #3439: pg_standby and path name with space

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "ISHIDA Akio" <iakio(at)mono-space(dot)net>, "Magnus Hagander" <magnus(at)hagander(dot)net>
Cc: <pgsql-bugs(at)postgresql(dot)org>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: BUG #3439: pg_standby and path name with space
Date: 2007-07-13 08:29:59
Message-ID: 1184315399.4512.14.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

On Thu, 2007-07-12 at 19:36 +0000, ISHIDA Akio wrote:
> The following bug has been logged online:
>
> Bug reference: 3439
> Operating system: Windows XP
> Description: pg_standby and path name with space
> Details:
>
> pg_standby failed if path name containing spaces.
>
> C:\Documents and Settings\ishida\pgsql>pg_standby -d "C:\Documents and
> Settings\ ishida\pgsql\archive_dir" 000000010000000000000000 data\pg_xlog
>
> Trigger file : <not set>
> Waiting for WAL file : C:\Documents and
> Settings\ishida\pgsql\archive_dir\000000010000000000000000
> WAL file path : 000000010000000000000000
> Restoring to... : data\pg_xlog
> Sleep interval : 5 seconds
> Max wait interval : 0 forever
> Command for restore : copy C:\Documents and
> Settings\ishida\pgsql\archive_dir\000000010000000000000000 data\pg_xlog
> Num archived files kept : all files
> running restore :The system cannot find the file specified.
> The system cannot find the file specified.
> The system cannot find the file specified.
> not restored :

Magnus,

Looks to me like the following patch would fix the reported issue on
Windows:

> --- pg_standby.c 26 Jun 2007 22:05:02 -0000 1.6
> +++ pg_standby.c 12 Jul 2007 19:03:19 -0000
> @@ -69,7 +69,7 @@
> int nextWALFileType;
>
> #define SET_RESTORE_COMMAND(cmd, arg1, arg2) \
> - snprintf(restoreCommand, MAXPGPATH, cmd " %s %s", arg1, arg2)
> + snprintf(restoreCommand, MAXPGPATH, cmd " \"%s\" \"%s\"", arg1,
> arg2)
>
> struct stat stat_buf;

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2007-07-13 08:50:16 Re: BUG #3439: pg_standby and path name with space
Previous Message ISHIDA Akio 2007-07-12 19:36:54 BUG #3439: pg_standby and path name with space

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2007-07-13 08:50:16 Re: BUG #3439: pg_standby and path name with space
Previous Message ITAGAKI Takahiro 2007-07-13 08:08:24 Re: pgstat_drop_relation bugfix