I didn't read the patch, but what lock level does that place on the partitioned table? Anything more than ACCESS SHARE?
Current patch locks a partitioned table with ACCESS EXCLUSIVE lock. Unfortunately only this lock guarantees that other session can not work with partitions that are splitting or merging.
I want add CONCURRENTLY mode in future. With this mode partitioned table during SPLIT/MERGE operation will be locked with SHARE UPDATE EXCLUSIVE (as ATTACH/DETACH PARTITION commands in CONCURRENTLY mode). But in this case queries from other sessions that want to work with partitions that are splitting/merging at this time should receive an error (like "Partition data is moving. Repeat the operation later") because old partitions will be deleted at the end of SPLIT/MERGE operation.
I hope exists a better solution, but I don't know it now... -- With best regards, Dmitry Koval Postgres Professional: http://postgrespro.com