From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: PITR on Win32 - Archive and Restore |
Date: | 2004-08-09 16:27:30 |
Message-ID: | 15906.1092068850@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 pgsql-patches |
> Okay, I'll change %p to emit \ on Windows, and we'll see where that
> takes us.
I've applied the attached patch, in case anyone is in a big hurry to try
it.
regards, tom lane
Index: src/backend/access/transam/xlog.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/access/transam/xlog.c,v
retrieving revision 1.157
diff -c -r1.157 xlog.c
*** src/backend/access/transam/xlog.c 8 Aug 2004 03:22:08 -0000 1.157
--- src/backend/access/transam/xlog.c 9 Aug 2004 16:23:51 -0000
***************
*** 1962,1968 ****
--- 1962,1978 ----
/* %p: full path of target file */
sp++;
StrNCpy(dp, xlogpath, endp-dp);
+ #ifndef WIN32
dp += strlen(dp);
+ #else
+ /* On Windows, change / to \ in the substituted path */
+ while (*dp)
+ {
+ if (*dp == '/')
+ *dp = '\\';
+ dp++;
+ }
+ #endif
break;
case 'f':
/* %f: filename of desired file */
Index: src/backend/postmaster/pgarch.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/postmaster/pgarch.c,v
retrieving revision 1.5
diff -c -r1.5 pgarch.c
*** src/backend/postmaster/pgarch.c 5 Aug 2004 23:32:10 -0000 1.5
--- src/backend/postmaster/pgarch.c 9 Aug 2004 16:23:51 -0000
***************
*** 436,442 ****
--- 436,452 ----
/* %p: full path of source file */
sp++;
StrNCpy(dp, pathname, endp-dp);
+ #ifndef WIN32
dp += strlen(dp);
+ #else
+ /* On Windows, change / to \ in the substituted path */
+ while (*dp)
+ {
+ if (*dp == '/')
+ *dp = '\\';
+ dp++;
+ }
+ #endif
break;
case 'f':
/* %f: filename of source file */
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Pflug | 2004-08-09 17:08:17 | Re: PITR on Win32 - Archive and Restore |
Previous Message | Tom Lane | 2004-08-09 16:08:36 | Re: PITR on Win32 - Archive and Restore |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2004-08-09 16:42:41 | Re: 8.0: Absolute path required for INITDB? |
Previous Message | Tom Lane | 2004-08-09 16:08:36 | Re: PITR on Win32 - Archive and Restore |