On Thursday, June 24, 2021 11:44 AM Zhihong Yu <z...@yugabyte.com> wrote: > Hi, > How about walking the partition hierarchy bottom up, recording the parents > but not taking the locks. > Once top-most parent is found, take the locks in reverse order (top down) ?
IMO, When we directly INSERT INTO a partition, postgres already lock the partition as the target table before execution which means we cannot postpone the lock on partition to find the parent table. Best regards, houzj