Re: optimizing pg_upgrade's once-in-each-database steps

2024-05-16 Thread Nathan Bossart
On Thu, May 16, 2024 at 05:09:55PM -0700, Jeff Davis wrote: > How much complexity do you avoid by using async instead of multiple > processes? If we didn't want to use async, my guess is we'd want to use threads to avoid complicated IPC. And if we followed pgbench's example for using threads, it

Re: optimizing pg_upgrade's once-in-each-database steps

2024-05-16 Thread Jeff Davis
On Thu, 2024-05-16 at 16:16 -0500, Nathan Bossart wrote: > I am posting this early to get thoughts on the general approach.  If > we > proceeded with this strategy, I'd probably create some generic > tooling that > each relevant step would provide a set of callback functions. The documentation

optimizing pg_upgrade's once-in-each-database steps

2024-05-16 Thread Nathan Bossart
A number of pg_upgrade steps require connecting to each database and running a query. When there are many databases, these steps are particularly time-consuming, especially since this is done sequentially in a single process. At a quick glance, I see the following such steps: *