In PostgreSQL 16, startup appears to initialize databases sequentially and primarily uses a single CPU core. In clusters with a very large number of databases (around 5,000 in our case), this results in noticeably long startup times after restarts or crash recovery.
You probably want to consider setting:
recovery_init_sync_method=syncfs
I'm 99% certain that that will solve your problem.