Re: PITR on Win32 - Archive and Restore

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: PITR on Win32 - Archive and Restore
Дата
Msg-id 200408110312.i7B3CWN19372@candle.pha.pa.us
обсуждение исходный текст
Список pgsql-hackers-win32
Andrew Dunstan wrote:
> 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.
>

I saw some tests using copy.exe and thought they all did.  I see now
that was just one test.  Now that I have the setup I will try some more
combinations tomorrow.

--
  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 по дате отправления:

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