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

Commit593c39d

Browse files
Revokebc5334d
1 parentd139a5e commit593c39d

File tree

7 files changed

+7
-74
lines changed

7 files changed

+7
-74
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -330,22 +330,6 @@ include 'filename'
330330
</listitem>
331331
</varlistentry>
332332

333-
<varlistentry id="guc-recovery-config-directory" xreflabel="recovery_config_directory">
334-
<term><varname>recovery_config_directory</varname> (<type>string</type>)</term>
335-
<indexterm>
336-
<primary><varname>recovery_config_directory</> configuration parameter</primary>
337-
</indexterm>
338-
<listitem>
339-
<para>
340-
Specifies the directory to use for the recovery.conf file. Note
341-
the server requires read and write permission on this directory
342-
because the file will be renamed to recovery.done at the end of
343-
recovery.
344-
This parameter can only be set at server start.
345-
</para>
346-
</listitem>
347-
</varlistentry>
348-
349333
<varlistentry id="guc-config-file" xreflabel="config_file">
350334
<term><varname>config_file</varname> (<type>string</type>)</term>
351335
<indexterm>

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

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262

6363
externboolbootstrap_data_checksums;
6464

65-
charrecoveryConfPath[MAXPGPATH];
6665
/* File path names (all relative to $PGDATA) */
6766
#defineRECOVERY_COMMAND_FILE"recovery.conf"
6867
#defineRECOVERY_COMMAND_DONE"recovery.done"
@@ -4164,16 +4163,15 @@ readRecoveryCommandFile(void)
41644163
*head=NULL,
41654164
*tail=NULL;
41664165

4167-
snprintf(recoveryConfPath,MAXPGPATH,"%s/%s",RecoveryConfDir,RECOVERY_COMMAND_FILE);
4168-
fd=AllocateFile(recoveryConfPath,"r");
4166+
fd=AllocateFile(RECOVERY_COMMAND_FILE,"r");
41694167
if (fd==NULL)
41704168
{
41714169
if (errno==ENOENT)
41724170
return;/* not there, so no archive recovery */
41734171
ereport(FATAL,
41744172
(errcode_for_file_access(),
41754173
errmsg("could not open recovery command file \"%s\": %m",
4176-
recoveryConfPath)));
4174+
RECOVERY_COMMAND_FILE)));
41774175
}
41784176

41794177
/*
@@ -4347,15 +4345,15 @@ readRecoveryCommandFile(void)
43474345
if (PrimaryConnInfo==NULL&&recoveryRestoreCommand==NULL)
43484346
ereport(WARNING,
43494347
(errmsg("recovery command file \"%s\" specified neither primary_conninfo nor restore_command",
4350-
recoveryConfPath),
4348+
RECOVERY_COMMAND_FILE),
43514349
errhint("The database server will regularly poll the pg_xlog subdirectory to check for files placed there.")));
43524350
}
43534351
else
43544352
{
43554353
if (recoveryRestoreCommand==NULL)
43564354
ereport(FATAL,
43574355
(errmsg("recovery command file \"%s\" must specify restore_command when standby mode is not enabled",
4358-
recoveryConfPath)));
4356+
RECOVERY_COMMAND_FILE)));
43594357
}
43604358

43614359
/* Enable fetching from archive recovery area */
@@ -4397,7 +4395,6 @@ static void
43974395
exitArchiveRecovery(TimeLineIDendTLI,XLogSegNoendLogSegNo)
43984396
{
43994397
charrecoveryPath[MAXPGPATH];
4400-
charrecoveryDonePath[MAXPGPATH];
44014398
charxlogpath[MAXPGPATH];
44024399

44034400
/*
@@ -4462,13 +4459,12 @@ exitArchiveRecovery(TimeLineID endTLI, XLogSegNo endLogSegNo)
44624459
* Rename the config file out of the way, so that we don't accidentally
44634460
* re-enter archive recovery mode in a subsequent crash.
44644461
*/
4465-
snprintf(recoveryDonePath,MAXPGPATH,"%s/%s",RecoveryConfDir,RECOVERY_COMMAND_DONE);
4466-
unlink(recoveryDonePath);
4467-
if (rename(recoveryConfPath,recoveryDonePath)!=0)
4462+
unlink(RECOVERY_COMMAND_DONE);
4463+
if (rename(RECOVERY_COMMAND_FILE,RECOVERY_COMMAND_DONE)!=0)
44684464
ereport(FATAL,
44694465
(errcode_for_file_access(),
44704466
errmsg("could not rename file \"%s\" to \"%s\": %m",
4471-
recoveryConfPath,recoveryDonePath)));
4467+
RECOVERY_COMMAND_FILE,RECOVERY_COMMAND_DONE)));
44724468

44734469
ereport(LOG,
44744470
(errmsg("archive recovery complete")));

‎src/backend/utils/init/globals.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ intMyPMChildSlot;
4646
* explicitly.
4747
*/
4848
char*DataDir=NULL;
49-
char*RecoveryConfDir=NULL;
5049

5150
charOutputFileName[MAXPGPATH];/* debugging output file */
5251

‎src/backend/utils/init/miscinit.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,6 @@ SetDataDir(const char *dir)
9999
DataDir=new;
100100
}
101101

102-
/*
103-
* Set recovery config directory, but make sure it's an absolute path. Use this,
104-
* never set RecoveryConfDir directly.
105-
*/
106-
void
107-
SetRecoveryConfDir(constchar*dir)
108-
{
109-
char*new;
110-
111-
AssertArg(dir);
112-
113-
/* If presented path is relative, convert to absolute */
114-
new=make_absolute_path(dir);
115-
116-
if (RecoveryConfDir)
117-
free(RecoveryConfDir);
118-
RecoveryConfDir=new;
119-
}
120-
121102
/*
122103
* Change working directory to DataDir. Most of the postmaster and backend
123104
* code assumes that we are in DataDir so it can use relative paths to access

‎src/backend/utils/misc/guc.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ inttemp_file_limit = -1;
424424
intnum_temp_buffers=1024;
425425

426426
char*data_directory;
427-
char*recovery_config_directory;
428427
char*ConfigFileName;
429428
char*HbaFileName;
430429
char*IdentFileName;
@@ -2961,17 +2960,6 @@ static struct config_string ConfigureNamesString[] =
29612960
NULL,NULL,NULL
29622961
},
29632962

2964-
{
2965-
{"recovery_config_directory",PGC_POSTMASTER,FILE_LOCATIONS,
2966-
gettext_noop("Sets the server's recovery configuration directory."),
2967-
NULL,
2968-
GUC_SUPERUSER_ONLY
2969-
},
2970-
&recovery_config_directory,
2971-
NULL,
2972-
NULL,NULL,NULL
2973-
},
2974-
29752963
{
29762964
{"config_file",PGC_POSTMASTER,FILE_LOCATIONS,
29772965
gettext_noop("Sets the server's main configuration file."),
@@ -4193,18 +4181,6 @@ SelectConfigFiles(const char *userDoption, const char *progname)
41934181
*/
41944182
SetConfigOption("data_directory",DataDir,PGC_POSTMASTER,PGC_S_OVERRIDE);
41954183

4196-
/*
4197-
* If the recovery_config_directory GUC variable has been set, use that,
4198-
* otherwise use DataDir.
4199-
*
4200-
* Note: SetRecoveryConfDir will copy and absolute-ize its argument,
4201-
* so we don't have to.
4202-
*/
4203-
if (recovery_config_directory)
4204-
SetRecoveryConfDir(recovery_config_directory);
4205-
else
4206-
SetRecoveryConfDir(DataDir);
4207-
42084184
/*
42094185
* If timezone_abbreviations wasn't set in the configuration file, install
42104186
* the default value. We do it this way because we can't safely install a

‎src/include/miscadmin.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ extern bool IsBinaryUpgrade;
137137
externboolExitOnAnyError;
138138

139139
externPGDLLIMPORTchar*DataDir;
140-
externPGDLLIMPORTchar*RecoveryConfDir;
141140

142141
externPGDLLIMPORTintNBuffers;
143142
externintMaxBackends;
@@ -302,7 +301,6 @@ extern OidGetCurrentRoleId(void);
302301
externvoidSetCurrentRoleId(Oidroleid,boolis_superuser);
303302

304303
externvoidSetDataDir(constchar*dir);
305-
externvoidSetRecoveryConfDir(constchar*dir);
306304
externvoidChangeToDataDir(void);
307305
externchar*make_absolute_path(constchar*path);
308306

‎src/include/utils/guc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ extern inttemp_file_limit;
220220
externintnum_temp_buffers;
221221

222222
externchar*data_directory;
223-
externchar*recovery_config_directory;
224223
externchar*ConfigFileName;
225224
externchar*HbaFileName;
226225
externchar*IdentFileName;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp