"Hayato Kuroda (Fujitsu)" <kuroda.hay...@fujitsu.com> writes: > While reading codes, I found that ApplyLauncherShmemInit() and > AutoVacuumShmemInit() > are always called even if they would not be launched. > It may be able to reduce the start time to avoid the unnecessary allocation.
Why would this be a good idea? It would require preventing the decision not to launch them from being changed later, except via postmaster restart. We've generally been trying to move away from unchangeable-without-restart decisions. In your example, > + if (max_logical_replication_workers == 0 || IsBinaryUpgrade) > + return; max_logical_replication_workers is already PGC_POSTMASTER so there's not any immediate loss of flexibility, but I don't think it's a great idea to introduce another reason why it has to be PGC_POSTMASTER. regards, tom lane