> You might be interested by this thread "Thinking about EXPLAIN ALTER TABLE":
> https://www.postgresql.org/message-id/CAM-w4HNm1M5J-ow8UjTcqRe3JPxkVCrGe56tRpPUSePSdGcZ_w%40mail.gmail.com I reviewed this thread, and the primary issue with the EXPLAIN command lies in the inability to predict all the steps the ALTER TABLE will take as some are made in phase 2 or 3. It is unlikely that all significant decisions can be made in phase 1. However, I don't think that EXPLAIN addresses the same problem as the proposed VERBOSE option. Consider, for instance, a user who intends to perform a schema change that includes a long sequence of ALTERs. These steps will depend on each other. Tom raises this point of dependent ALTERs [2] but for a different reason. I think however, this is an important point. How will EXPLAIN help here? It may not tell you the truth, because it does not actually do the work and can't know the future state of the schema. VERBOSE on the other hand will perform the steps, and a user can test these changes in a test environment or a schema-only restore and know exactly what to expect in production. As this thread has expanded beyond its original scope, I believe this broader discussion is valuable. Rather than merely addressing the DEBUG1 issue, we can work toward a more complete and beneficial solution. Thoughts? [0] https://www.postgresql.org/message-id/26597.1544460770%40sss.pgh.pa.us Regards, Sami