Re: PITR on Win32 - Archive and Restore

Поиск
Список
Период
Сортировка
От markir@coretech.co.nz
Тема Re: PITR on Win32 - Archive and Restore
Дата
Msg-id 1091935453.d918d7e4f0507@mail.coretech.co.nz
обсуждение исходный текст
Ответ на Re: PITR on Win32 - Archive and Restore  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: PITR on Win32 - Archive and Restore
Список pgsql-hackers-win32
Using :

archive_command = '"copy "%p" "c:/databases/pgarchive/%f""'

I see this is the log:

LOG:  archive command ""copy
"c:/databases/pgdata/pg_xlog/000000010000000000000000"
"c:/databases/pgarchive/000000010000000000000000""" failed: return code 1
The system cannot find the file specified.

Looks like it is confused about what the executable is...

regards

Mark

Quoting Bruce Momjian <pgman@candle.pha.pa.us>:

> Andrew Dunstan wrote:
> >
> > Oh, yes, multiple quotes strings also cause problems :-(. You have no
> > idea how frustrating this was when I was writing initdb, and how hard it
> > was to find the problems.
> >
> > The chdir solution might be best if we can do it, so that we only need
> > to quote the destination path.
> >
> > cheers
> >
> > andrew
> >
> > markir@coretech.co.nz wrote:
> >
> > >I tried out Andrew's suggestion, to no avail - none of the
> archive_commands
> > >below work:
> > >
> > >archive_command = 'copy "%p" "c:/databases/pgarchive/%f"'
> > >archive_command = 'copy \"%p\" \"c:/databases/pgarchive/%f\"'
> > >archive_command = 'copy \\"%p\\" \\"c:/databases/pgarchive/%f\\"' #
> desperation
> > >...
>
> As I remember the fix was to use this:
>
>     archive_command = '"copy "%p" "c:/databases/pgarchive/%f""'
>
> Yes, that is one extra quote at the start and end of the string.  Would
> you try that?
>
> FYI, port.h has this:
>
>     /*
>      *  Win32 needs double quotes at the beginning and end of system()
>      *  strings.  If not, it gets confused with multiple quoted strings.
>      *  It also must use double-quotes around the executable name
>      *  and any files used for redirection.  Other args can use single-quotes.
>      *
>      *  See the "Notes" section about quotes at:
>      *      http://home.earthlink.net/~rlively/MANUALS/COMMANDS/C/CMD.HTM
>      */
>     #ifdef WIN32
>     #define SYSTEMQUOTE "\""
>     #else
>     #define SYSTEMQUOTE ""
>     #endif
>
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
>





В списке pgsql-hackers-win32 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PITR on Win32 - Archive and Restore
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PITR on Win32 - Archive and Restore