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

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: Ilya Gladyshev <ilya(dot)v(dot)gladyshev(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: optimizing pg_upgrade's once-in-each-database steps
Date: 2024-08-15 16:03:21
Message-ID: Zr4mycERiqJx09y_@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 10, 2024 at 10:35:46AM -0500, Nathan Bossart wrote:
> Another option might be to combine all the queries for a task into a single
> string and then send that in one PQsendQuery() call. That may be a simpler
> way to eliminate the time between queries.

I tried this out and didn't see any difference in my tests. However, the
idea seems sound, and I could remove ~40 lines of code by doing this and by
making the search_path query an implicit first step (instead of its own
state). So, here's a v9 of the patch set with those changes.

--
nathan

Attachment Content-Type Size
v9-0001-introduce-framework-for-parallelizing-pg_upgrade-.patch text/plain 14.2 KB
v9-0002-use-new-pg_upgrade-async-API-for-subscription-sta.patch text/plain 8.9 KB
v9-0003-use-new-pg_upgrade-async-API-for-retrieving-relin.patch text/plain 13.1 KB
v9-0004-use-new-pg_upgrade-async-API-to-parallelize-getti.patch text/plain 3.2 KB
v9-0005-use-new-pg_upgrade-async-API-to-parallelize-repor.patch text/plain 3.3 KB
v9-0006-parallelize-data-type-checks-in-pg_upgrade.patch text/plain 12.3 KB
v9-0007-parallelize-isn-and-int8-passing-mismatch-check-i.patch text/plain 3.5 KB
v9-0008-parallelize-user-defined-postfix-ops-check-in-pg_.patch text/plain 5.2 KB
v9-0009-parallelize-incompatible-polymorphics-check-in-pg.patch text/plain 7.6 KB
v9-0010-parallelize-tables-with-oids-check-in-pg_upgrade.patch text/plain 3.4 KB
v9-0011-parallelize-user-defined-encoding-conversions-che.patch text/plain 4.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-08-15 17:13:49 Re: Make query cancellation keys longer
Previous Message vignesh C 2024-08-15 16:00:32 Re: long-standing data loss bug in initial sync of logical replication