RE: [bug?] Missed parallel safety checks, and wrong parallel safety - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject RE: [bug?] Missed parallel safety checks, and wrong parallel safety
Date
Msg-id OS0PR01MB5716E0591AE7C43BBC51D77494079@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: [bug?] Missed parallel safety checks, and wrong parallel safety  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
On Thursday, June 24, 2021 11:44 AM Zhihong Yu <zyu@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

pgsql-hackers by date:

Previous
From: Greg Nancarrow
Date:
Subject: Re: [bug?] Missed parallel safety checks, and wrong parallel safety
Next
From: Tom Lane
Date:
Subject: Re: Decoding speculative insert with toast leaks memory