Re: cannot drop intarray extension

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: cannot drop intarray extension
Date: 2024-06-07 05:14:24
Message-ID: ZmKXMMX3nEswYbCu@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 07, 2024 at 11:32:14AM +0800, jian he wrote:
> in deleteObjectsInList, under certain conditions trying to sort the to
> be deleted object list
> by just using sort_object_addresses seems to work,
> but it looks like a hack.
> maybe the proper fix would be in findDependentObjects.

@@ -1459,6 +1459,7 @@ RemoveRelations(DropStmt *drop)
[...]
- performMultipleDeletions(objects, drop->behavior, flags);
+ if (list_length(drop->objects) > 1)
+ sortable = false;

I have not studied the patch in details, but this looks
overcomplicated to me. All the callers of performMultipleDeletions
pass down sortable as true, while deleteObjectsInList() uses this
argument to avoid the sorting on nested calls. It seems to me that
this could be simpler.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2024-06-07 05:18:22 Re: use CREATE DATABASE STRATEGY = FILE_COPY in pg_upgrade
Previous Message Michael Paquier 2024-06-07 05:07:33 PgStat_KindInfo.named_on_disk not required in shared stats