Hacker News new | past | comments | ask | show | jobs | submit login

Been reading the code.. very tidy. However the Complete step (e.g. in op_set_notnull.go) renames the temporary column name to the proper column name on the underlying table.. but while the docs describe the view on the new schema getting updated to refer to the now renamed underlying column, I do not seem to find the step where it happens? Also, shouldn't those two steps be in a transaction to ensure no failed queries in between - otherwise that's enough to be qualified as downtime ihmo? Quite dubious to see that `createView` is only called once, on `Start`, and that there doesn't seem to be locks or transactions.

Unless obviously the view has magic to use either column name based on what's available on the underlying, but I did not see that either on `createView`.




There is no code to do this because it's actually a nice feature of postgres - if the underlying column is renamed, the pgroll views that depend on that column are updated automatically as part of the same transaction.


Very cool, thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: