Re:Zero-downtime schema migrations in Postgres using Reshape
by jeremyjh on Friday January 07, 2022 @09:14AM
(#29839295)
I've had some issues in the past with queries on top of views not properly using indexes in postgres. I wish I'd saved some examples but I'm now quite cautious about putting a lot of views between my queries and my tables (though the examples I had were not simple views, but views that joined several tables together). Are the views only used during the migration or are they used all the time?
[ Parent
| on HN ]
Re:Zero-downtime schema migrations in Postgres using Reshape
by fabianlindfors on Friday January 07, 2022 @09:17AM
(#29839334)
They are used all the time. If you ever find some examples of this, I'd be really interested to see them. Reshape only uses simple, updatable views [0] which hopefully means it won't struggle with finding indices.
[0] https://www.postgresql.org/docs/current/sql-createview.html