From cbafd6618af9f10e89ed05ff82dac69e65a70307 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 8 Oct 2013 22:41:23 -0400 Subject: [PATCH] Move new effective_cache_size function Previously set_default_effective_cache_size() could not handle fork, non-fork, and bootstrap cases. --- src/backend/bootstrap/bootstrap.c | 2 ++ src/backend/postmaster/postmaster.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index d23dc4504a..53c55a3694 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -312,6 +312,8 @@ AuxiliaryProcessMain(int argc, char *argv[]) proc_exit(1); } + set_default_effective_cache_size(); + /* * Identify myself via ps */ diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index c4b54d12cb..73babdaf5f 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -778,6 +778,8 @@ PostmasterMain(int argc, char *argv[]) ExitPostmaster(1); } + set_default_effective_cache_size(); + /* * Locate the proper configuration files and data directory, and read * postgresql.conf for the first time. @@ -4476,8 +4478,6 @@ SubPostmasterMain(int argc, char *argv[]) memset(&port, 0, sizeof(Port)); read_backend_variables(argv[2], &port); - set_default_effective_cache_size(); - /* * Set reference point for stack-depth checking */ -- 2.40.0