diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-07-10 17:37:42 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-07-10 18:35:24 +0200 |
commit | bcbd940806a2011d6f99ae72ea5897e8a94c6093 (patch) | |
tree | a51aac6939900d6ba74b83bda1999304ac178c1b /src/bin/initdb/initdb.c | |
parent | 17b715c634d451da3edb221c55c614a7d993c289 (diff) |
Remove dynamic_shared_memory_type=none
PostgreSQL nowadays offers some kind of dynamic shared memory feature on
all supported platforms. Having the choice of "none" prevents us from
relying on DSM in core features. So this patch removes the choice of
"none".
Author: Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Diffstat (limited to 'src/bin/initdb/initdb.c')
-rw-r--r-- | src/bin/initdb/initdb.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index ae22e7d9fb8..3f203c6ca6d 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -984,6 +984,15 @@ test_config_settings(void) ok_buffers = 0; + /* + * Need to determine working DSM implementation first so that subsequent + * tests don't fail because DSM setting doesn't work. + */ + printf(_("selecting dynamic shared memory implementation ... ")); + fflush(stdout); + dynamic_shared_memory_type = choose_dsm_implementation(); + printf("%s\n", dynamic_shared_memory_type); + printf(_("selecting default max_connections ... ")); fflush(stdout); @@ -996,10 +1005,11 @@ test_config_settings(void) "\"%s\" --boot -x0 %s " "-c max_connections=%d " "-c shared_buffers=%d " - "-c dynamic_shared_memory_type=none " + "-c dynamic_shared_memory_type=%s " "< \"%s\" > \"%s\" 2>&1", backend_exec, boot_options, test_conns, test_buffs, + dynamic_shared_memory_type, DEVNULL, DEVNULL); status = system(cmd); if (status == 0) @@ -1031,10 +1041,11 @@ test_config_settings(void) "\"%s\" --boot -x0 %s " "-c max_connections=%d " "-c shared_buffers=%d " - "-c dynamic_shared_memory_type=none " + "-c dynamic_shared_memory_type=%s " "< \"%s\" > \"%s\" 2>&1", backend_exec, boot_options, n_connections, test_buffs, + dynamic_shared_memory_type, DEVNULL, DEVNULL); status = system(cmd); if (status == 0) @@ -1046,11 +1057,6 @@ test_config_settings(void) printf("%dMB\n", (n_buffers * (BLCKSZ / 1024)) / 1024); else printf("%dkB\n", n_buffers * (BLCKSZ / 1024)); - - printf(_("selecting dynamic shared memory implementation ... ")); - fflush(stdout); - dynamic_shared_memory_type = choose_dsm_implementation(); - printf("%s\n", dynamic_shared_memory_type); } /* |