Postgres is so good!
-
-
DDL changes in transactions was my killer feature that moved me to PG
-
yeah, it really captures the difference between the two in one nice bullet point
End of conversation
New conversation -
-
-
It’s a lovely feature but it’s worth noting that most ORMs/drivers out there can’t execute multiple statements, so this feature is often unused (Rails migrations are a prime example).
-
"On databases that support transactions with statements that change the schema, migrations are wrapped in a transaction." https://edgeguides.rubyonrails.org/active_record_migrations.html …
-
Hmmm - I wonder if that’s each step? I’d be surprised (and happy to be wrong) if the entire thing ran under a *single* transaction.
-
Rails executes all statements in a migration as one transaction by default. You have to disable this if you want to use things like CREATE INDEX CONCURRENTLY.
-
Good to know - thanks :). I think I’m confusing multiple statements vs. multiple executions within a BEGIN block. Nevermind me.
End of conversation
New conversation -
-
-
Yes i am always amazed when i work on MySQL projects "Didn't we… solve that like 5 years ago sure but… transactions in migrations? oh uuids? oh queries in json fields? oh ctes… window… ok ok… ah i should use a different table type? how many are there? oh wow…"
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
In MySQL DDL will abort any other running transactions, too. For example, a migration will kill a mysqldump backup running in —single-transaction mode when it hits the replica…
-
I don’t have enough scream emojis for MySQL behaviour.
End of conversation
New conversation -
-
-
On the last project we were using MySQL, and migrations needed to be broken into tiny single-statement chunks because of this. We ended up having like a hundred of them
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I've been using Postgres for so long that it's inconceivable to me that MySQL doesn't support this too. Had to look it up myself before I believed you.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Not to mention the returning after an update... PostgreSQL is awesome!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
oh wow I didn't know that, that's terrifying.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.