Re: Rename of triggers for partitioned tables

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Arne Roland <A(dot)Roland(at)index(dot)de>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Rename of triggers for partitioned tables
Date: 2021-07-22 16:20:35
Message-ID: 202107221620.vrxflq2i5y7l@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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 need to traverse the child tables. Since we still need to lock them, there is likely no practical performance gain. But I am 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 —
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Bauyrzhan Sakhariyev 2021-07-22 16:24:35 Re: truncating timestamps on arbitrary intervals
Previous Message Mark Dilger 2021-07-22 16:18:51 Re: pg_amcheck: Fix block number parsing on command line