Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
10249abf
Commit
10249abf
authored
Aug 12, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup Win32 COPY handling, and move archive examples to SGML.
parent
43ea65a0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
48 deletions
+34
-48
doc/src/sgml/runtime.sgml
doc/src/sgml/runtime.sgml
+19
-11
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+1
-13
src/backend/postmaster/pgarch.c
src/backend/postmaster/pgarch.c
+2
-11
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/misc/postgresql.conf.sample
+0
-10
src/port/path.c
src/port/path.c
+12
-3
No files found.
doc/src/sgml/runtime.sgml
View file @
10249abf
<!--
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.27
5 2004/08/08 20:17:33 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.27
6 2004/08/12 19:03:17 momjian
Exp $
-->
<Chapter Id="runtime">
...
...
@@ -1435,16 +1435,24 @@ SET ENABLE_SEQSCAN TO OFF;
<term><varname>archive_command</varname> (<type>string</type>)</term>
<listitem>
<para>
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),
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 <literal>%p</> in the string is
replaced
by the absolute path of the file to archive, while any <literal>%f</>
is replaced by the file name only. Write <literal>%%</> if you need
to embed an actual <literal>%</> character in the command. For more
information see <xref linkend="backup-archiving-wal">. This option
can only be set at server start or in the
<filename>postgresql.conf</filename> file.
replaced by the absolute path of the file to archive, and any
<literal>%f</> is replaced by the file name only. Use
<literal>%%</> to embed an actual <literal>%</> character in the
command. For more information see <xref
linkend="backup-archiving-wal">. This option can only be set at
server start or in the <filename>postgresql.conf</filename>
file.
</para>
<para>
It is important for the command to return a zero exit status only if
it succeeds. Examples:
<programlisting>
archive_command = 'cp "%p" /mnt/server/archivedir/"%f"'
archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Win32
</programlisting>
</para>
</listitem>
</varlistentry>
...
...
src/backend/access/transam/xlog.c
View file @
10249abf
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.16
1 2004/08/12 18:34:45
momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.16
2 2004/08/12 19:03:23
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1962,18 +1962,6 @@ RestoreArchivedFile(char *path, const char *xlogfname,
/* %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
;
...
...
src/backend/postmaster/pgarch.c
View file @
10249abf
...
...
@@ -19,7 +19,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.
6 2004/08/09 16:26:06 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.
7 2004/08/12 19:03:34 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -436,17 +436,8 @@ pgarch_archiveXlog(char *xlog)
/* %p: full path of source file */
sp
++
;
StrNCpy
(
dp
,
pathname
,
endp
-
dp
);
#ifndef WIN32
make_native_path
(
dp
);
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 */
...
...
src/backend/utils/misc/postgresql.conf.sample
View file @
10249abf
...
...
@@ -117,16 +117,6 @@
# - 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
#---------------------------------------------------------------------------
...
...
src/port/path.c
View file @
10249abf
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/path.c,v 1.2
8 2004/08/12 18:32:52
momjian Exp $
* $PostgreSQL: pgsql/src/port/path.c,v 1.2
9 2004/08/12 19:03:44
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -88,8 +88,17 @@ last_dir_separator(const char *filename)
/*
* make_native_path
* On WIN32, change / to \ in the path.
* 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment