Re: Adding support for Default partition in partitioning - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Adding support for Default partition in partitioning
Date
Msg-id 339239fb-f7c8-9cce-8ac9-4fc68b5c9219@lab.ntt.co.jp
Whole thread Raw
In response to Re: Adding support for Default partition in partitioning  (Rushabh Lathia <rushabh.lathia@gmail.com>)
Responses Re: Adding support for Default partition in partitioning
List pgsql-hackers
On 2017/04/05 14:41, Rushabh Lathia wrote:
> I agree about the future plan about the row movement, how that is I am
> not quite sure at this stage.
> 
> I was thinking that CREATE new partition is the DDL command, so even
> if row-movement works with holding the lock on the new partition table,
> that should be fine. I am not quire sure, why row movement should be
> happen in the back-ground process.

I think to improve the availability of access to the partitioned table.

Consider that the default partition may have gotten pretty large.
Scanning it and moving rows to the newly added partition while holding an
AccessExclusiveLock on the parent will block any and all of the concurrent
activity on it until the row-movement is finished.  One may be prepared to
pay this cost, for which there should definitely be an option to perform
the row-movement in the same transaction (also possibly the default behavior).

Thanks,
Amit





pgsql-hackers by date:

Previous
From: Kuntal Ghosh
Date:
Subject: Re: strange parallel query behavior after OOM crashes
Next
From: Heikki Linnakangas
Date:
Subject: Re: Outdated comments around HandleFunctionRequest