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

Commit7c619be

Browse files
committed
Fix typos in comments for ALTER SYSTEM.
Michael Paquier
1 parent152d24f commit7c619be

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

‎src/backend/utils/misc/guc-file.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ ProcessConfigFile(GucContext context)
149149
}
150150
151151
/*
152-
* Parsepostgresql.auto.conffile after postgresql.conf to replace
152+
* Parse file PG_AUTOCONF_FILENAME after postgresql.conf to replace
153153
* parameters set by ALTER SYSTEM command. This file is present in
154154
* data directory, however when called during initdb data directory is not
155155
* set till this point, so use ConfigFile path which will be same.

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

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6457,9 +6457,9 @@ flatten_set_variable_args(const char *name, List *args)
64576457
}
64586458

64596459
/*
6460-
*Writes updated configuration parameter values into
6461-
*postgresql.auto.conf.temp file. Ittraverses the list of parameters
6462-
*and quote the stringvalues before writing them to temporaray file.
6460+
*Write updated configuration parameter values into a temporary file.
6461+
*This functiontraverses the list of parameters and quotes the string
6462+
* values before writing them.
64636463
*/
64646464
staticvoid
64656465
write_auto_conf_file(intfd,constchar*filename,ConfigVariable**head_p)
@@ -6468,8 +6468,8 @@ write_auto_conf_file(int fd, const char *filename, ConfigVariable **head_p)
64686468
StringInfoDatabuf;
64696469

64706470
initStringInfo(&buf);
6471-
appendStringInfoString(&buf,"# Do not edit this file manually!\n");
6472-
appendStringInfoString(&buf,"# It will be overwritten by ALTER SYSTEM command.\n");
6471+
appendStringInfoString(&buf,"# Do not edit this file manually!\n");
6472+
appendStringInfoString(&buf,"# It will be overwritten by ALTER SYSTEM command.\n");
64736473

64746474
/*
64756475
* write the file header message before contents, so that if there is no
@@ -6517,7 +6517,7 @@ write_auto_conf_file(int fd, const char *filename, ConfigVariable **head_p)
65176517

65186518
/*
65196519
* This function takes list of all configuration parameters in
6520-
*postgresql.auto.conf and parameter to be updated as input arguments and
6520+
*PG_AUTOCONF_FILENAME and parameter to be updated as input arguments and
65216521
* replace the updated configuration parameter value in a list. If the
65226522
* parameter to be updated is new then it is appended to the list of
65236523
* parameters.
@@ -6595,13 +6595,12 @@ replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p,
65956595
* and write them all to the automatic configuration file.
65966596
*
65976597
* The configuration parameters are written to a temporary
6598-
* file then renamed to the final name. The template for the
6599-
* temporary file is postgresql.auto.conf.temp.
6598+
* file then renamed to the final name.
66006599
*
66016600
* An LWLock is used to serialize writing to the same file.
66026601
*
66036602
* In case of an error, we leave the original automatic
6604-
* configuration file (postgresql.auto.conf) intact.
6603+
* configuration file (PG_AUTOCONF_FILENAME) intact.
66056604
*/
66066605
void
66076606
AlterSystemSetConfigFile(AlterSystemStmt*altersysstmt)
@@ -6664,8 +6663,8 @@ AlterSystemSetConfigFile(AlterSystemStmt * altersysstmt)
66646663

66656664

66666665
/*
6667-
* Use data directory as reference path forpostgresql.auto.conf andit's
6668-
* correspondingtemp file
6666+
* Use data directory as reference path forPG_AUTOCONF_FILENAME andits
6667+
* correspondingtemporary file.
66696668
*/
66706669
join_path_components(AutoConfFileName,data_directory,PG_AUTOCONF_FILENAME);
66716670
canonicalize_path(AutoConfFileName);
@@ -6674,10 +6673,10 @@ AlterSystemSetConfigFile(AlterSystemStmt * altersysstmt)
66746673
"temp");
66756674

66766675
/*
6677-
*one backend is allowed to operate onpostgresql.auto.conffile, to
6676+
*One backend is allowed to operate on file PG_AUTOCONF_FILENAME, to
66786677
* ensure that we need to update the contents of the file with
66796678
* AutoFileLock. To ensure crash safety, first the contents are written to
6680-
* temporary fileandthenrename ittopostgresql.auto.conf. In case
6679+
*atemporary filewhich isthenrenameedtoPG_AUTOCONF_FILENAME. In case
66816680
* there exists a temp file from previous crash, that can be reused.
66826681
*/
66836682

@@ -6694,14 +6693,14 @@ AlterSystemSetConfigFile(AlterSystemStmt * altersysstmt)
66946693
{
66956694
if (stat(AutoConfFileName,&st)==0)
66966695
{
6697-
/* openpostgresql.auto.conffile */
6696+
/* open file PG_AUTOCONF_FILENAME */
66986697
infile=AllocateFile(AutoConfFileName,"r");
66996698
if (infile==NULL)
67006699
ereport(ERROR,
67016700
(errmsg("failed to open auto conf file \"%s\": %m ",
67026701
AutoConfFileName)));
67036702

6704-
/*Parse the postgresql.auto.conf file */
6703+
/*parse it */
67056704
ParseConfigFp(infile,AutoConfFileName,0,LOG,&head,&tail);
67066705

67076706
FreeFile(infile);
@@ -6713,7 +6712,7 @@ AlterSystemSetConfigFile(AlterSystemStmt * altersysstmt)
67136712
*/
67146713
replace_auto_config_value(&head,&tail,AutoConfFileName,name,value);
67156714

6716-
/* Write and sync theNew contents topostgresql.auto.conf.temp file */
6715+
/* Write and sync thenew contents tothe temporary file */
67176716
write_auto_conf_file(Tmpfd,AutoConfTmpFileName,&head);
67186717

67196718
close(Tmpfd);

‎src/bin/initdb/initdb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,8 +1300,8 @@ setup_config(void)
13001300
* file will override the value of parameters that exists before parse of
13011301
* this file.
13021302
*/
1303-
autoconflines[0]=pg_strdup("# Do not edit this file manually!\n");
1304-
autoconflines[1]=pg_strdup("# It will be overwritten by the ALTER SYSTEM command.\n");
1303+
autoconflines[0]=pg_strdup("# Do not edit this file manually!\n");
1304+
autoconflines[1]=pg_strdup("# It will be overwritten by the ALTER SYSTEM command.\n");
13051305
autoconflines[2]=NULL;
13061306

13071307
sprintf(path,"%s/%s",pg_data,PG_AUTOCONF_FILENAME);

‎src/include/pg_config_manual.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,6 @@
304304
/*
305305
* Automatic configuration file name for ALTER SYSTEM.
306306
* This file will be used to store values of configuration parameters
307-
* set by ALTER SYSTEM command
307+
* set by ALTER SYSTEM command.
308308
*/
309309
#definePG_AUTOCONF_FILENAME"postgresql.auto.conf"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp