LogicalLauncherMain
This wait event corresponds to a situation when the Logical Replication Launcher process is waiting in its main sleep loop for something to happen
Logical Replication Launcher is a background process that is responsible for launching and managing logical replication workers in PostgreSQL.
It periodically wakes up to check for new replication tasks and starts the necessary worker processes to handle them.
When the Logical Replication Launcher is in its main sleep loop, it is essentially idle, waiting for a signal or event that indicates it needs to take action, such as starting a new logical replication worker.
How it works
- The launcher periodically wakes up to see if any new subscriptions have been created or if any existing ones need a worker process (e.g., if an "apply" worker crashed)
- If there are no new tasks, it goes back to sleep, waiting for the next check interval and showing
LogicalLauncherMain which is normal and expected behavior for the Logical Replication Launcher process
- When a new task is detected, the launcher requests the postmaster to start a new background worker process
When to be concerned
- High percentages of time spent in
LogicalLauncherMain are generally not a concern, as this is expected behavior for the Logical Replication Launcher process
- However, if you notice that logical replication workers are not being started when expected, it may be worth investigating further to ensure that the launcher is functioning correctly
Make sure that max_worker_processes is configured to allow for the necessary background workers to be started
Tuning considerations
max_worker_processes parameter can be adjusted to ensure that there are enough resources available for logical replication workers and other background processes.
Logical Replication Configuration Parameters