• Alvaro Herrera's avatar
    Fix background workers for EXEC_BACKEND · cdbc0ca4
    Alvaro Herrera authored
    Commit da07a1e8 was broken for EXEC_BACKEND because I failed to realize
    that the MaxBackends recomputation needed to be duplicated by
    subprocesses in SubPostmasterMain.  However, instead of having the value
    be recomputed at all, it's better to assign the correct value at
    postmaster initialization time, and have it be propagated to exec'ed
    backends via BackendParameters.
    
    MaxBackends stays as zero until after modules in
    shared_preload_libraries have had a chance to register bgworkers, since
    the value is going to be untrustworthy till that's finished.
    
    Heikki Linnakangas and Álvaro Herrera
    cdbc0ca4
postmaster.h 2.21 KB