[openstreetmap/openstreetmap-website] Switch to TIMESTAMP WITH TIME ZONE for current_* tables (#375)

Andy Allan notifications at github.com
Wed Nov 21 17:39:57 UTC 2018


I found this in the [postgresql 9.2 release notes](https://www.postgresql.org/docs/9.2/release-9-2.html), which sounds hopeful that the table changes might be done without extended downtimes:

> Reduce need to rebuild tables and indexes for certain ALTER TABLE ... ALTER COLUMN TYPE operations (Noah Misch)
>
> Increasing the length limit for a varchar or varbit column, or removing the limit altogether, no longer requires a table rewrite. Similarly, increasing the allowable precision of a numeric column, or changing a column from constrained numeric to unconstrained numeric, no longer requires a table rewrite. Table rewrites are also avoided in similar cases involving the interval, timestamp, and timestamptz types.

I think we'll still need a short downtime to get the locks, but hopefully will be fast apart from that.

Is there a replica that this could be tested on? Or should we just start with the smaller tables and work our way up? :smiley: 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/375#issuecomment-440752159
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181121/f064e2cb/attachment.html>


More information about the rails-dev mailing list