Re: Parallelizing startup with many databases

Поиск
Список
Период
Сортировка
От Jelte Fennema-Nio
Тема Re: Parallelizing startup with many databases
Дата
Msg-id CAGECzQSu1BeW3EvRwUWGYL+EBHzDhLCRW3LKcqTU-Y4_44myZA@mail.gmail.com
обсуждение исходный текст
Ответ на Parallelizing startup with many databases  (Babak Ghadiri <bbkghadiri6@gmail.com>)
Ответы Re: Parallelizing startup with many databases
Список pgsql-hackers


On Fri, Jan 2, 2026, 08:55 Babak Ghadiri <bbkghadiri6@gmail.com> wrote:
Hello,
I hope you are doing well.

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. 




PS It took me way to long to find that setting. I think we should move it from the error handling docs page to the page with all of the other recovery settings. https://www.postgresql.org/docs/current/runtime-config-wal.html#RUNTIME-CONFIG-WAL-RECOVERY

В списке pgsql-hackers по дате отправления: