Centralize effective_cache_size default setting
authorBruce Momjian <bruce@momjian.us>
Wed, 9 Oct 2013 12:33:12 +0000 (08:33 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 9 Oct 2013 12:33:12 +0000 (08:33 -0400)
src/backend/bootstrap/bootstrap.c
src/backend/postmaster/postmaster.c
src/backend/tcop/postgres.c
src/backend/utils/misc/guc.c

index 08687f4ff5514d89626b1dcd823c0900ad205824..d23dc4504aed1694911022f59f544840fa790152 100644 (file)
@@ -350,8 +350,6 @@ AuxiliaryProcessMain(int argc, char *argv[])
            proc_exit(1);
    }
 
-   set_default_effective_cache_size();
-   
    /* Validate we have been given a reasonable-looking DataDir */
    Assert(DataDir);
    ValidatePgVersion(DataDir);
index bd20e14ea57f15a922828b03a3e8ea27ece67467..c9a8a8fc459bca448f443e838f73720e70ecaa11 100644 (file)
@@ -785,8 +785,6 @@ PostmasterMain(int argc, char *argv[])
    if (!SelectConfigFiles(userDoption, progname))
        ExitPostmaster(2);
 
-   set_default_effective_cache_size();
-
    if (output_config_variable != NULL)
    {
        /*
index 4b2a7761af8dfa5e2072c34f78118a8a246fa1bb..1eaf287eec9f4e08cdaca28142c5914ffbd718ff 100644 (file)
@@ -3592,8 +3592,6 @@ PostgresMain(int argc, char *argv[],
            proc_exit(1);
    }
 
-   set_default_effective_cache_size();
-       
    /*
     * You might expect to see a setsid() call here, but it's not needed,
     * because if we are under a postmaster then BackendInitialize() did it.
index 833f34b1ee28ac7bc12684313b3b02d4e0f5f27e..ddbeb34ce723fdb551736e3b2b09edc22f169424 100644 (file)
@@ -4238,6 +4238,8 @@ SelectConfigFiles(const char *userDoption, const char *progname)
     */
    pg_timezone_abbrev_initialize();
 
+   set_default_effective_cache_size();
+       
    /*
     * Figure out where pg_hba.conf is, and make sure the path is absolute.
     */