Re: PITR on Win32 - Archive and Restore

"Andrew Dunstan" <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
Bruce Momjian said:
>
> OK, I have a solution.  It turns out that COPY and COPY.EXE behave
> differently.  :-O
>
> 	# cat x.c
> 	#include <stdio.h>
>
> 	main()
> 	{
> 	        system("copy.exe \"c:/msys/1.0/home/bruce momjian/a b\"
> 	\"c:/msys/1.0/home/bruce momjian/c d\"");
> 	}
> 	# gcc -o x x.c
> 	# ./x
> 	The system cannot find the file specified.
>
> I just changed copy to copy.exe, and bingo, failure.
>
> I suggest we back out the backslash patch and provide a Win32 sample
> archive line in postgresql.conf that quotes both args, and that we add
> quotes to the Unix example too.

There is no copy.exe - it's a command builtin to cmd.exe, at least on my
system.
Before jumping to a conclusion that we have an answer we need to make sure
it works portably across all the Windows versions we are working with.

My testing and Mark's experience suggest that the source path needs to be
backslashed but the destination path maybe doesn't - which would actually
work quite well for us *with* the backslash patch.

cheers

andrew





---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.