Hi Shihao, Thanks for v4. I tested it on the current master, it applies cleanly, make check and the isolation tests pass.
It fixes the 0003 cases I sent( SET STATISTICS, ALTER COLUMN TYPE) now reaches p1 and FINALIZE works afterwards. It also works when p1 is itself partitioned. I agree with leaving the 0001-only invalid index for a separate patch, since plain DETACH has the same gap. Two small things on 0003: 1) The spec covers ADD CHECK and SET DEFAULT, but not the cases that actually broke before. Could you add ALTER COLUMN TYPE and DROP COLUMN on the parent followed by FINALIZE? 2) Parent DDL now locks the pending partition too, so a session that is only reading p1 now blocks ALTER TABLE on t, and anything queued behind it on t. That makes sense, but I think the commit message should mention it, and maybe a sentence in the FINALIZE part of alter_table.sgml saying ALTER TABLE on the parent also applies to a partition pending detach. Just a suggestion not a blocker for me. Overall the patch looks good. Regards, Surya Poondla
