Re: PITR on Win32 - Archive and Restore

"Christian Klemke" <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <000601c47de9$2e2a42b0$2401a8c0@NTBKCKLEMKE>
Question:
It is my understanding that this copy operation is initiated out of some
main program and not in a shell script, right ?
Then why don't you use one of the CopyFile or CopyFileEx API routines on
Win32 ? Sure, it will need some additional #ifdef clauses in the source
codes, but I think performance will be better and you can even include a
progress callback function. Besides, no child process needs to be created
and - best of all ! - this approach removes all file name escaping and
parsing issues because it will take source and destination parameters as
strings.
What do you think ?

Regards,
Christian.

----- Original Message ----- 
From: "Andrew Dunstan" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>
Sent: Monday, August 09, 2004 9:36 AM
Subject: Re: [pgsql-hackers-win32] PITR on Win32 - Archive and Restore


> > Well, it is really fighting us.....
> >
> > This is the archive_command:
> >
> > '""copy.exe" "%p" "c:/databases/pgarchive/%f""'
> >
> > and this is the log:
> >
> > LOG:  archive command """copy.exe"
> > "c:/databases/pgdata/pg_xlog/000000010000000000000007"
> > "c:/databases/pgarchive/000000010000000000000007""" failed: return code
> > 1 '"copy.exe"' is not recognized as an internal or external command,
> > operable program or batch file.
> >
> > (tried plain old '"copy"' too)
> >
>
> What happens with this archive command?:
>
> '"copy "%p" "c:/databases/pgarchive/%f""'
>
> cheers
>
> andrew
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>



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

               http://www.postgresql.org/docs/faqs/FAQ.html
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.