3 ms·
Every month, we do an external database import into our production PostgreSQL database. In a single transaction, we drop dozens of tables, create new ones with
by yobert 6y ago
Every month, we do an external database import into our production PostgreSQL database. In a single transaction, we drop dozens of tables, create new ones with the same names, insert hundreds of thousands of rows, and recreate indexes, all in a single transaction. It works flawlessly.
- vijaybritto 6y agowow! have you tested for network errors in any of these steps? Will it rollback automatically if there are any errors?
- sterwill 6y agoIf it's in a transaction, it will do the same thing it would do for any failed transaction (roll it back). DDL isn't special.