Re: PITR on Win32 - Archive and Restore

Lists: pgsql-hackers-win32
From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Subject: Re: PITR on Win32 - Archive and Restore
Date: 2004-08-09 12:54:52
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB34101AF28@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32

>
> I don't think that's workable unless we intend to distribute it.
Gary's
> suggestion of using xcopy is probably a good one.
>
> I will install MSys and friends on my new Windows machine and play
> around to see what works, unless someone comes up with a tested
solution
> first.

You know, it might be nice to have the inserted path be set up with
slashes dependant on the OS type. Or, perhaps an alternate set of
macros in the archive string to reverse the slashes. Forcing people to
use xcopy or cp will cause problems in various scenarios.

Merlin


From: "Christian Klemke" <Christian(dot)Klemke(at)t-online(dot)de>
To: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: <markir(at)coretech(dot)co(dot)nz>, "pgsql-hackers-win32" <pgsql-hackers-win32(at)postgresql(dot)org>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, <pgadmin(at)pse-consulting(dot)de>, <dpage(at)vale-housing(dot)co(dot)uk>
Subject: Re: PITR on Win32 - Archive and Restore
Date: 2004-08-09 13:25:51
Message-ID: PostgreSQL : Re : 토토 사이트 순위의 Pitr- 아카이브 및 복원
Views: Raw Message | PostgreSQL : | Download mbox | Resend email
Lists: Postg사설 토토 사이트SQL :

Guys,

did you notice my earlier CopyFile / CopyFileEx posting (at about 10:20
German time) ?
If you want to stick with an external copy executable (which I don't quite
understand), just go and write one yourself and provide it for Windows
users. Leaving aside the neccessary checks, it might be as simple as:

#include <windows.h>
int main(char* args[]) {
return CopyFile(args[0],args[1],TRUE);
}

Adding a proprietary parser for secure handling of quotes (to deal of paths
containing space)s should be simple, I'm sure you have adequate functions in
your Postgres library. Link it to a file called copy.exe or cp.exe or
wahtever and add it to the PGBIN directory.

Cheers,
Christian.

----- Original Message -----
From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>; "Simon Riggs"
<simon(at)2ndquadrant(dot)com>
Sent: Monday, August 09, 2004 2:54 PM
Subject: Re: [pgsql-hackers-win32] PITR on Win32 - Archive and Restore

>
> I don't think that's workable unless we intend to distribute it.
Gary's
> suggestion of using xcopy is probably a good one.
>
> I will install MSys and friends on my new Windows machine and play
> around to see what works, unless someone comes up with a tested
solution
> first.

You know, it might be nice to have the inserted path be set up with
slashes dependant on the OS type. Or, perhaps an alternate set of
macros in the archive string to reverse the slashes. Forcing people to
use xcopy or cp will cause problems in various scenarios.

Merlin

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


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Christian Klemke <Christian(dot)Klemke(at)t-online(dot)de>
Cc: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, markir(at)coretech(dot)co(dot)nz, pgsql-hackers-win32 <pgsql-hackers-win32(at)postgresql(dot)org>, pgadmin(at)pse-consulting(dot)de, dpage(at)vale-housing(dot)co(dot)uk
Subject: Re: PITR on Win32 - Archive and Restore
Date: 2004-08-09 13:40:47
Message-ID: 41177EDF.8020003@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32


Christian,

what you have not done is to follow the context of the discussion. This
command is a configuration option, and thus executed with a system()
call. We do not have the luxury of hardcoding it available to us.

Note that system() actually calls cmd.exe, so your previous comment
about needing to use cmd /c is also wrong.

cheers

andrew

Christian Klemke wrote:

>Guys,
>
>did you notice my earlier CopyFile / CopyFileEx posting (at about 10:20
>German time) ?
>If you want to stick with an external copy executable (which I don't quite
>understand), just go and write one yourself and provide it for Windows
>users. Leaving aside the neccessary checks, it might be as simple as:
>
>#include <windows.h>
>int main(char* args[]) {
> return CopyFile(args[0],args[1],TRUE);
>}
>
>Adding a proprietary parser for secure handling of quotes (to deal of paths
>containing space)s should be simple, I'm sure you have adequate functions in
>your Postgres library. Link it to a file called copy.exe or cp.exe or
>wahtever and add it to the PGBIN directory.
>
>
>
>
>