Re: optimizing pg_upgrade's once-in-each-database steps
Nathan Bossart <nathandbossart@gmail.com>
Attachments
On Wed, Sep 04, 2024 at 12:28:23AM +0100, Ilya Gladyshev wrote: > The fix looks right to me, but I got confused by the skip_wait and this > `if`: > > + if (PQstatus(slot->conn) != CONNECTION_OK) > + return; > > This branch checks connection status that hasn't been refreshed after the > select. When we go back to wait_slots after this, PQconnectPoll will refresh > the connection status and run select with skip_wait=true, I believe, we > could simplify this by moving the PQconnectPoll back to the process_slots, > so that we can process connection right after polling, if it's ready. Ah, yes, that's a nice way to simplify things. I ended up just making it process_slot()'s responsibility to set the correct select_mode, at which point the logic in the switch statement in wait_on_slots() is sparse enough that it seems better to convert it to a couple of short "if" statements. -- nathan
Commits
-
Introduce framework for parallelizing various pg_upgrade tasks.
- 40e2e5e92b7d 18.0 landed
-
pg_upgrade: Parallelize WITH OIDS check.
- f93f5f7b984e 18.0 landed
-
pg_upgrade: Parallelize contrib/isn check.
- 9db3018cf83b 18.0 landed
-
pg_upgrade: Parallelize data type checks.
- bbf83cab98f2 18.0 landed
-
pg_upgrade: Parallelize encoding conversion check.
- c880cf258864 18.0 landed
-
pg_upgrade: Parallelize incompatible polymorphics check.
- cf2f82a37cc3 18.0 landed
-
pg_upgrade: Parallelize postfix operator check.
- c34eabfbbfd3 18.0 landed
-
pg_upgrade: Parallelize retrieving extension updates.
- 6ab8f27bc716 18.0 landed
-
pg_upgrade: Parallelize retrieving loadable libraries.
- 46cad8b31927 18.0 landed
-
pg_upgrade: Parallelize retrieving relation information.
- 6d3d2e8e541f 18.0 landed
-
pg_upgrade: Parallelize subscription check.
- 7baa36de58bd 18.0 landed
-
pg_upgrade: Move live_check variable to user_opts.
- 4b56bb4ab485 18.0 landed
-
pg_upgrade: run all data type checks per connection
- 347758b12063 17.0 cited