>> However, for a very large user group -- users with ORMs which do their
>> own DDL migrations -- we could also use a way to log or WARN for table
>> rewrites.  Since the ORMs are not gonna do an EXPLAIN.
> 
> An ORM is also quite unlikely to pay attention to a warning, much less a
> postmaster log entry ... so your argument seems unfounded from here.

But the DevOps staff *is*.

There's the workflow:

1. developer writes migrations in Rails/Django/Hibernate
2. DevOps staff tests migrations on test machine.
3. DevOps staff looks at logs for rewrites.

The problem with an EXPLAIN path is that you're requiring the developers
to extract the DDL generated by Rails or whatever from the migration,
something to which the framework is not very friendly.  So we need a
path for identifying rewrites which doesn't require extracting DDL in
SQL form.

EXCEPT: I just realized, if we have "explain ALTER" then we can just log
explains, no?  In which case, problem solved.

Come to think of it, it would be good to warn about ACCESS EXCLUSIVE
locks as well.  That's another big booby trap for developers.

Note that "writing stuff to the log" is far from an ideal solution for
this user base.  I think they'd rather have "ERROR on REWRITE".  It
would be good to have one of the Heroku folks speak up here ...

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to