Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit56834fc

Browse files
committed
Rename restartpoint_command to archive_cleanup_command.
1 parent0a7cb85 commit56834fc

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

‎doc/src/sgml/high-availability.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/high-availability.sgml,v 1.71 2010/06/07 02:01:08 itagaki Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/high-availability.sgml,v 1.72 2010/06/10 08:13:49 itagaki Exp $ -->
22

33
<chapter id="high-availability">
44
<title>High Availability, Load Balancing, and Replication</title>
@@ -681,7 +681,7 @@ protocol to make nodes agree on a serializable transactional order.
681681
</para>
682682

683683
<para>
684-
You can use <varname>restartpoint_command</> to prune the archive of
684+
You can use <varname>archive_cleanup_command</> to prune the archive of
685685
files no longer needed by the standby.
686686
</para>
687687

@@ -714,7 +714,7 @@ trigger_file = '/path/to/trigger_file'
714714

715715
<para>
716716
If you're using a WAL archive, its size can be minimized using
717-
the <varname>restartpoint_command</> option to remove files that are
717+
the <varname>archive_cleanup_command</> option to remove files that are
718718
no longer required by the standby server. Note however, that if you're
719719
using the archive for backup purposes, you need to retain files needed
720720
to recover from at least the latest base backup, even if they're no

‎doc/src/sgml/recovery-config.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/recovery-config.sgml,v 2.6 2010/04/28 07:34:11 heikki Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/recovery-config.sgml,v 2.7 2010/06/10 08:13:49 itagaki Exp $ -->
22

33
<chapter Id="recovery-config">
44
<title>Recovery Configuration</title>
@@ -73,16 +73,16 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
7373
</listitem>
7474
</varlistentry>
7575

76-
<varlistentry id="restartpoint-command" xreflabel="restartpoint_command">
77-
<term><varname>restartpoint_command</varname> (<type>string</type>)</term>
76+
<varlistentry id="archive-cleanup-command" xreflabel="archive_cleanup_command">
77+
<term><varname>archive_cleanup_command</varname> (<type>string</type>)</term>
7878
<indexterm>
79-
<primary><varname>restartpoint_command</> recovery parameter</primary>
79+
<primary><varname>archive_cleanup_command</> recovery parameter</primary>
8080
</indexterm>
8181
<listitem>
8282
<para>
8383
This parameter specifies a shell command that will be executed at
8484
every restartpoint. This parameter is optional. The purpose of the
85-
<varname>restartpoint_command</> is to provide a mechanism for cleaning
85+
<varname>archive_cleanup_command</> is to provide a mechanism for cleaning
8686
up old archived WAL files that are no longer needed by the standby
8787
server.
8888
Any <literal>%r</> is replaced by the name of the file
@@ -114,7 +114,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
114114
<varname>recovery_end_command</> is to provide a mechanism for cleanup
115115
following replication or recovery.
116116
Any <literal>%r</> is replaced by the name of the file containing the
117-
last valid restart point, like in <xref linkend="restartpoint-command">.
117+
last valid restart point, like in <xref linkend="archive-cleanup-command">.
118118
</para>
119119
<para>
120120
If the command returns a non-zero exit status then a WARNING log

‎src/backend/access/transam/recovery.conf.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
#restore_command = ''# e.g. 'cp /mnt/server/archivedir/%f %p'
4747
#
4848
#
49-
#restartpoint_command
49+
#archive_cleanup_command
5050
#
5151
# specifies an optional shell command to execute at every restartpoint.
5252
# This can be useful for cleaning up the archive of a standby server.
5353
#
54-
#restartpoint_command = ''
54+
#archive_cleanup_command = ''
5555
#
5656
# recovery_end_command
5757
#

‎src/backend/access/transam/xlog.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.421 2010/06/1007:49:23 heikki Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.422 2010/06/1008:13:50 itagaki Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -180,7 +180,7 @@ static bool restoredFromArchive = false;
180180
/* options taken from recovery.conf for archive recovery */
181181
staticchar*recoveryRestoreCommand=NULL;
182182
staticchar*recoveryEndCommand=NULL;
183-
staticchar*restartPointCommand=NULL;
183+
staticchar*archiveCleanupCommand=NULL;
184184
staticRecoveryTargetTyperecoveryTarget=RECOVERY_TARGET_UNSET;
185185
staticboolrecoveryTargetInclusive= true;
186186
staticTransactionIdrecoveryTargetXid;
@@ -382,10 +382,10 @@ typedef struct XLogCtlData
382382
TimeLineIDThisTimeLineID;
383383
TimeLineIDRecoveryTargetTLI;
384384
/*
385-
*restartPointCommand is read from recovery.conf but needs to be in
385+
*archiveCleanupCommand is read from recovery.conf but needs to be in
386386
* shared memory so that the bgwriter process can access it.
387387
*/
388-
charrestartPointCommand[MAXPGPATH];
388+
chararchiveCleanupCommand[MAXPGPATH];
389389

390390
/*
391391
* SharedRecoveryInProgress indicates if we're still in crash or archive
@@ -3063,7 +3063,7 @@ RestoreArchivedFile(char *path, const char *xlogfname,
30633063
* 'failonSignal' is true and the command is killed by a signal, a FATAL
30643064
* error is thrown. Otherwise a WARNING is emitted.
30653065
*
3066-
* This is currently used for restore_end_command andrestartpoint_command.
3066+
* This is currently used for restore_end_command andarchive_cleanup_command.
30673067
*/
30683068
staticvoid
30693069
ExecuteRecoveryCommand(char*command,char*commandName,boolfailOnSignal)
@@ -5140,12 +5140,12 @@ readRecoveryCommandFile(void)
51405140
(errmsg("recovery_end_command = '%s'",
51415141
recoveryEndCommand)));
51425142
}
5143-
elseif (strcmp(tok1,"restartpoint_command")==0)
5143+
elseif (strcmp(tok1,"archive_cleanup_command")==0)
51445144
{
5145-
restartPointCommand=pstrdup(tok2);
5145+
archiveCleanupCommand=pstrdup(tok2);
51465146
ereport(DEBUG2,
5147-
(errmsg("restartpoint_command = '%s'",
5148-
restartPointCommand)));
5147+
(errmsg("archive_cleanup_command = '%s'",
5148+
archiveCleanupCommand)));
51495149
}
51505150
elseif (strcmp(tok1,"recovery_target_timeline")==0)
51515151
{
@@ -5752,13 +5752,13 @@ StartupXLOG(void)
57525752
ControlFile->checkPointCopy.ThisTimeLineID)));
57535753

57545754
/*
5755-
* Save the selected recovery target timeline ID andrestartpoint_command
5755+
* Save the selected recovery target timeline ID andarchive_cleanup_command
57565756
* in shared memory so that other processes can see them
57575757
*/
57585758
XLogCtl->RecoveryTargetTLI=recoveryTargetTLI;
5759-
strncpy(XLogCtl->restartPointCommand,
5760-
restartPointCommand ?restartPointCommand :"",
5761-
sizeof(XLogCtl->restartPointCommand));
5759+
strncpy(XLogCtl->archiveCleanupCommand,
5760+
archiveCleanupCommand ?archiveCleanupCommand :"",
5761+
sizeof(XLogCtl->archiveCleanupCommand));
57625762

57635763
if (InArchiveRecovery)
57645764
{
@@ -7675,11 +7675,11 @@ CreateRestartPoint(int flags)
76757675
LWLockRelease(CheckpointLock);
76767676

76777677
/*
7678-
* Finally, executerestartpoint_command, if any.
7678+
* Finally, executearchive_cleanup_command, if any.
76797679
*/
7680-
if (XLogCtl->restartPointCommand[0])
7681-
ExecuteRecoveryCommand(XLogCtl->restartPointCommand,
7682-
"restartpoint_command",
7680+
if (XLogCtl->archiveCleanupCommand[0])
7681+
ExecuteRecoveryCommand(XLogCtl->archiveCleanupCommand,
7682+
"archive_cleanup_command",
76837683
false);
76847684

76857685
return true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp