Re: autoprewarm_dump_now - Mailing list pgsql-hackers

From Robert Haas
Subject Re: autoprewarm_dump_now
Date
Msg-id CA+TgmobRMXwFg4AUZ96FvXALFkN8H7KBqhCp-CtMS83RuKXG3A@mail.gmail.com
Whole thread Raw
In response to Re: autoprewarm_dump_now  (Melanie Plageman <melanieplageman@gmail.com>)
List pgsql-hackers
On Fri, Apr 4, 2025 at 12:17 PM Melanie Plageman
<melanieplageman@gmail.com> wrote:
> Unrelated to this problem, but I wondered why autoprewarm doesn''t
> launch background workers for each database simultaneously instead of
> waiting for each one to finish a db before moving onto the next one.
> Is it simply to limit the number of bgworkers taking up resources?

That's probably part of it, but also (1) a system that allowed for
multiple workers would be somewhat more complex to implement and (2)
I'm not sure how beneficial it would be. We go to some trouble to make
the I/O as sequential as possible, and this would detract from that. I
also don't know how long prewarming normally takes -- if it's fast
enough already, then maybe this doesn't matter. But if somebody is
having a problem with autoprewarm being slow and wants to implement a
multi-worker system to make it faster, cool.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Use XLOG_CONTROL_FILE macro everywhere?
Next
From: Antonin Houska
Date:
Subject: Re: why there is not VACUUM FULL CONCURRENTLY?