On Wed, Aug 26, 2026 at 12:06 PM jian he <[email protected]> wrote: > I believe the original design first tries to lock the partitioned > table with AccessExclusiveLock. > Then, later patches incrementally reduce the lock level. > > Achieving the same result with ATTACH PARTITION requires the user to scan the > data out, store it somewhere, and then scan it back in. MERGE/SPLIT PARTITION > needs only a single scan. If we can lower the lock level on the > parent table as well > that would make the feature clearly worthwhile.
One can avoid the second scan by initially added relevant CHECK constraint to the table, which is going to be the a new partition. That allow subsequent ALTER TABLE ... ATTACH PARTITION to skip the scan. Thus, manual procedure can at least avoid blocking reader for long. ------ Regards, Alexander Korotkov Supabase
