On Mon, 10 Dec 2018 at 12:27, Simon Riggs <si...@2ndquadrant.com> wrote: > > An event trigger with a table_rewrite event, allows you to scan a whole > script for objectionable activity on a test server before you put it into > production. > > Perhaps we just need a few extra events.
That's not a bad idea at all. Offhand the missing events that come to mind are: 1. Validation passes 1. Table Rebuild pass 1. Index builds 1. Locks that block DDL (currently that's AccessExclusiveLock and ShareRowExclusiveLock) I see this as complementary to EXPLAIN ALTER TABLE rather than replacing it. EXPLAIN would help the developer understand what their commands were doing and why during development and the event triggers would serve largely as safety backstop in staging and production to ensure nothing slips through. -- greg