Re: Rename of triggers for partitioned tables - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Rename of triggers for partitioned tables
Date
Msg-id 202107221620.vrxflq2i5y7l@alvherre.pgsql
Whole thread Raw
In response to Re: Rename of triggers for partitioned tables  (Arne Roland <A.Roland@index.de>)
Responses Re: Rename of triggers for partitioned tables  (Arne Roland <A.Roland@index.de>)
List pgsql-hackers
On 2021-Jul-22, Arne Roland wrote:

> 
> Hi,
> 
> looking at the patch, I realized the renametrig_partition could  use an index leading with tgparentid, without the
needto traverse the child tables. Since we still need to lock them, there is likely no practical performance gain. But
Iam surprised there is no unique index on (tgparentid, tgrelid), which sounds like a decent sanity check to have
anyways.

If we have good use for such an index, I don't see why we can't add it.
But I'm not sure that it is justified -- certainly if the only benefit
is to make ALTER TRIGGER RENAME recurse faster on partitioned tables, it
is not justified.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: pg_amcheck: Fix block number parsing on command line
Next
From: Bauyrzhan Sakhariyev
Date:
Subject: Re: truncating timestamps on arbitrary intervals