News for hackers. Stuff that matters.
Re:Recursive Postgres Queries by joevandyk on Tuesday June 25, 2013 @03:50AM (#5938107)
Oracle lets DBAs do that, but I've not seen a database migration tool that knows how to understand/express that.

I'm assuming that Oracle lets you do this via some sort of a sql file/script? I'd think the process would be:

1. Create SQL file that locks the query plan

2. Test it

3. Check into version control

4. Using migration tool, apply to production database

PostgreSQL lets you do all sorts of updates without locks, fwiw, and that's what I'm most experienced with. And all postgresql administration can be done via text files that can be checked into version control.

Re:Recursive Postgres Queries by btilly on Tuesday June 25, 2013 @01:05PM (#5940865)
I'm assuming that Oracle lets you do this via some sort of a sql file/script?

Not that I know of. When I took the SQL tuning class where I learned about it, they had an interactive admin panel for tracking down, identifying, and fixing query plans.

But I'm not a DBA, I haven't used Oracle in a few years, and I do not know what all is available there.

Re:Recursive Postgres Queries by just_hobbyst on Tuesday June 25, 2013 @08:19AM (#5938877)
That would be interesting - but I wonder if it makes sense.

@btilly: what is the name of the thing with locking queries you referred to?

Re:Recursive Postgres Queries by btilly on Tuesday June 25, 2013 @01:11PM (#5940918)
Any upgrade script that does certain operations will lock tables as it goes. See your database documentation for details. This can include rebuilding indexes, removing columns, modifying existing columns, etc. Furthermore when you've got both stored procedures and tables changing, you have to get the order of operations correct. I'm not aware of any automated tool that can figure out the dependencies and do so correctly. (Mind you I have not looked recently.)