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

Commitd4a9004

Browse files
committed
Cosmetic cleanups in initdb.c.
Commitbcbd940 didn't bother to fix up a comment it had falsified.Also, const-ify choose_dsm_implementation(), since what it's returningis always a constant string; pickier compilers would warn about this.
1 parentf841ceb commitd4a9004

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static char *pgdata_native;
173173
/* defaults */
174174
staticintn_connections=10;
175175
staticintn_buffers=50;
176-
staticchar*dynamic_shared_memory_type=NULL;
176+
staticconstchar*dynamic_shared_memory_type=NULL;
177177

178178
/*
179179
* Warning messages for authentication methods
@@ -916,7 +916,7 @@ set_null_conf(void)
916916
* the postmaster either, and configure the cluster for System V shared
917917
* memory instead.
918918
*/
919-
staticchar*
919+
staticconstchar*
920920
choose_dsm_implementation(void)
921921
{
922922
#ifdefHAVE_SHM_OPEN
@@ -952,9 +952,7 @@ choose_dsm_implementation(void)
952952
/*
953953
* Determine platform-specific config settings
954954
*
955-
* Use reasonable values if kernel will let us, else scale back. Probe
956-
* for max_connections first since it is subject to more constraints than
957-
* shared_buffers.
955+
* Use reasonable values if kernel will let us, else scale back.
958956
*/
959957
staticvoid
960958
test_config_settings(void)
@@ -983,7 +981,6 @@ test_config_settings(void)
983981
test_buffs,
984982
ok_buffers=0;
985983

986-
987984
/*
988985
* Need to determine working DSM implementation first so that subsequent
989986
* tests don't fail because DSM setting doesn't work.
@@ -993,6 +990,10 @@ test_config_settings(void)
993990
dynamic_shared_memory_type=choose_dsm_implementation();
994991
printf("%s\n",dynamic_shared_memory_type);
995992

993+
/*
994+
* Probe for max_connections before shared_buffers, since it is subject to
995+
* more constraints than shared_buffers.
996+
*/
996997
printf(_("selecting default max_connections ... "));
997998
fflush(stdout);
998999

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp