Index: doc/src/sgml/runtime.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/runtime.sgml,v
retrieving revision 1.275
diff -c -c -r1.275 runtime.sgml
*** doc/src/sgml/runtime.sgml 8 Aug 2004 20:17:33 -0000 1.275
--- doc/src/sgml/runtime.sgml 12 Aug 2004 18:54:37 -0000
***************
*** 1435,1450 ****
archive_command (string)
! The shell command to execute to archive a completed segment of the
! WAL file series. If this is an empty string (which is the default),
! WAL archiving is disabled. Any %p> in the string is
! replaced
! by the absolute path of the file to archive, while any %f>
! is replaced by the file name only. Write %%> if you need
! to embed an actual %> character in the command. For more
! information see . This option
! can only be set at server start or in the
! postgresql.conf file.
--- 1435,1458 ----
archive_command (string)
! The shell command to execute to archive a completed segment of
! the WAL file series. If this is an empty string (the default),
! WAL archiving is disabled. Any %p> in the string is
! replaced by the absolute path of the file to archive, and any
! %f> is replaced by the file name only. Use
! %%> to embed an actual %> character in the
! command. For more information see . This option can only be set at
! server start or in the postgresql.conf
! file.
!
!
! It is important for the command to return a zero exit status only if
! it succeeds. Examples:
!
! archive_command = 'cp "%p" /mnt/server/archivedir/"%f"'
! archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Win32
!
Index: src/backend/access/transam/xlog.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/access/transam/xlog.c,v
retrieving revision 1.161
diff -c -c -r1.161 xlog.c
*** src/backend/access/transam/xlog.c 12 Aug 2004 18:34:45 -0000 1.161
--- src/backend/access/transam/xlog.c 12 Aug 2004 18:54:50 -0000
***************
*** 1962,1979 ****
/* %p: full path of target file */
sp++;
StrNCpy(dp, xlogpath, endp-dp);
- /*
- * make_native_path() is required because WIN32 COPY is
- * an internal CMD.EXE command and doesn't process
- * forward slashes in the same way as external commands.
- * Quoting the first argument to COPY does not convert
- * forward to backward slashes, but COPY does properly
- * process quoted forward slashes in the second argument.
- *
- * COPY works with quoted forward slashes in the first argument
- * only if the current directory is the same as the directory
- * of the first argument.
- */
make_native_path(dp);
dp += strlen(dp);
break;
--- 1962,1967 ----
Index: src/backend/postmaster/pgarch.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/postmaster/pgarch.c,v
retrieving revision 1.6
diff -c -c -r1.6 pgarch.c
*** src/backend/postmaster/pgarch.c 9 Aug 2004 16:26:06 -0000 1.6
--- src/backend/postmaster/pgarch.c 12 Aug 2004 18:54:52 -0000
***************
*** 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 */
--- 436,443 ----
/* %p: full path of source file */
sp++;
StrNCpy(dp, pathname, endp-dp);
! make_native_path(dp);
dp += strlen(dp);
break;
case 'f':
/* %f: filename of source file */
Index: src/backend/utils/misc/postgresql.conf.sample
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.125
diff -c -c -r1.125 postgresql.conf.sample
*** src/backend/utils/misc/postgresql.conf.sample 12 Aug 2004 18:32:37 -0000 1.125
--- src/backend/utils/misc/postgresql.conf.sample 12 Aug 2004 18:54:55 -0000
***************
*** 117,132 ****
# - Archiving -
#archive_command = '' # command to use to archive a logfile segment
- #
- # If archive_command is '' then archiving is disabled. Otherwise, set it
- # to a command to copy a file to the proper place. Any %p in the string
- # is replaced by the absolute path of the file to archive, while any %f is
- # replaced by the file name only. NOTE: it is important for the command to
- # return zero exit status only if it succeeds.
- #
- # Examples:
- # archive_command = 'cp "%p" /mnt/server/archivedir/"%f"'
- # archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Win32
#---------------------------------------------------------------------------
--- 117,122 ----
Index: src/port/path.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/port/path.c,v
retrieving revision 1.28
diff -c -c -r1.28 path.c
*** src/port/path.c 12 Aug 2004 18:32:52 -0000 1.28
--- src/port/path.c 12 Aug 2004 18:55:02 -0000
***************
*** 88,95 ****
/*
! * make_native_path
! * On WIN32, change / to \ in the path.
*/
void
make_native_path(char *filename)
--- 88,104 ----
/*
! * make_native_path - on WIN32, change / to \ in the path
! *
! * This is required because WIN32 COPY is an internal CMD.EXE
! * command and doesn't process forward slashes in the same way
! * as external commands. Quoting the first argument to COPY
! * does not convert forward to backward slashes, but COPY does
! * properly process quoted forward slashes in the second argument.
! *
! * COPY works with quoted forward slashes in the first argument
! * only if the current directory is the same as the directory
! * of the first argument.
*/
void
make_native_path(char *filename)