pgsql: Switch query fixing aclitems in ~15 from O(N^2) to O(N) in upgra

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Switch query fixing aclitems in ~15 from O(N^2) to O(N) in upgra
Date: 2022-12-25 23:02:02
Message-ID: E1p9a0I-000PbW-Dl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Switch query fixing aclitems in ~15 from O(N^2) to O(N) in upgrade_adapt.sql

f4f2f2b was doing a sequential scan of pg_class before checking if a
relation had attributes dependent on aclitem as data typewhen building
the set of ALTER TABLE queries, but it would be costly on a regression
database.

While on it, make the query style more consistent with the rest.

Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/20221223032724.GQ1153@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d3c0cc4447307a2ffbcff8274573b544294e583c

Modified Files
--------------
src/bin/pg_upgrade/upgrade_adapt.sql | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2022-12-26 03:36:50 pgsql: Add 'logical_decoding_mode' GUC.
Previous Message Tom Lane 2022-12-25 19:32:46 pgsql: Convert enum_in() to report errors softly.