Unix Technical Forum

Re: [BUGS] BUG #3439: pg_standby and path name with space

This is a discussion on Re: [BUGS] BUG #3439: pg_standby and path name with space within the Pgsql Patches forums, part of the PostgreSQL category; --> On Thu, 2007-07-12 at 19:36 +0000, ISHIDA Akio wrote: > The following bug has been logged online: > > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:22 AM
Simon Riggs
 
Posts: n/a
Default Re: [BUGS] BUG #3439: pg_standby and path name with space

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\0000000100000000 00000000
> 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\0000000100000000 00000000 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


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:22 AM
Magnus Hagander
 
Posts: n/a
Default Re: [BUGS] BUG #3439: pg_standby and path name with space

On Fri, Jul 13, 2007 at 09:29:59AM +0100, Simon Riggs wrote:
> 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\0000000100000000 00000000
> > 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\0000000100000000 00000000 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:


Is this actually a Windows issue? Doesn't the same problem show up on Unix
if you have a space in the path? (It's a lot more common on Windows, but
it'spossible on Unix as well).

It does seem that the fix should work on Unix as well though, but just to
we label the thing correctly.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 11:22 AM
Devinder Singh
 
Posts: n/a
Default Re: [BUGS] BUG #3439: pg_standby and path name with space

Hi Can anytone tell me how can i get the pgestraier test database


On 13/07/07, Magnus Hagander <magnus@hagander.net> wrote:
>
> On Fri, Jul 13, 2007 at 09:29:59AM +0100, Simon Riggs wrote:
> > 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\0000000100000000 00000000
> > > 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\0000000100000000 00000000

> 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:

>
> Is this actually a Windows issue? Doesn't the same problem show up on Unix
> if you have a space in the path? (It's a lot more common on Windows, but
> it'spossible on Unix as well).
>
> It does seem that the fix should work on Unix as well though, but just to
> we label the thing correctly.
>
> //Magnus
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>




--
Devinder

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 11:23 AM
Magnus Hagander
 
Posts: n/a
Default Re: [BUGS] BUG #3439: pg_standby and path name with space

On Fri, Jul 13, 2007 at 10:50:16AM +0200, Magnus Hagander wrote:
> On Fri, Jul 13, 2007 at 09:29:59AM +0100, Simon Riggs wrote:
> > 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\0000000100000000 00000000
> > > 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\0000000100000000 00000000 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:

>
> Is this actually a Windows issue? Doesn't the same problem show up on Unix
> if you have a space in the path? (It's a lot more common on Windows, but
> it'spossible on Unix as well).
>
> It does seem that the fix should work on Unix as well though, but just to
> we label the thing correctly.


My own very trivial checks shows it should, so I've applied this patch.

Thanks!

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:17 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com