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 — https://www.EnterpriseDB.com/ "Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)