Locks in creating a partition in CREATE TABLE vs ALTER TABLE

2021-03-02 Thread Asaf Flescher
Hi, I'm not sure if this is a bug or I'm missing something regarding how partitioning is supposed to work but I've noticed (in Postgres 12.6) that if I have a partitioned table, and then try to add a partition to it via CREATE TABLE ... PARTITION OF, the statement will grab an AccessExclusive lock

Re: Locks in creating a partition in CREATE TABLE vs ALTER TABLE

2021-03-03 Thread Asaf Flescher
Mar 2, 2021 at 5:29 PM Alvaro Herrera wrote: > On 2021-Mar-02, Asaf Flescher wrote: > > > I'm not sure if this is a bug or I'm missing something regarding how > > partitioning is supposed to work but I've noticed (in Postgres 12.6) that > > if I have a partit