Postgres 12 Required Starting August 4, 2021

140 views
Skip to first unread message

Simon Williams

unread,
Apr 6, 2021, 10:44:31 AM4/6/21
to Canvas LMS Users
Hi all, we wanted to let you know that we have upgraded all production environments to Postgres 12 here at Instructure and will be requiring Postgres 12 starting with the 2021-08-04 branch.

This came up last week after it was pointed out that we had started taking advantage of a newer Postgres feature in migrations without making clear that running a newer Postgres version was required. Sorry for any trouble that caused.

If you're curious about specifics, we added the `redo_request` boolean column to the submissions table in the 2021-03-03 release, using our standard zero-downtime method of first adding the column nullable with no default, then setting a default for new rows, then backfilling all existing null rows, and then changing the column to be non-nullable. This was _very_ slow on the large submissions table, so we decided to take advantage of this new PG11 feature: https://www.depesz.com/2018/04/04/waiting-for-postgresql-11-fast-alter-table-add-column-with-a-non-null-default/. You can see the change here: https://github.com/instructure/canvas-lms/commit/7574f599bbd0deb0f7100642bbf0ca46ec937b6e.

While this change is technically backward compatible, on older PG versions this will lock the whole submissions table, causing requests to back up and potential downtime.

We have since modified the migration again to support both old and new PG versions, which you can see here: https://github.com/instructure/canvas-lms/commit/6e877868be0728b26ab8067630a1264f08a92773. For the next 4 months, any other column additions will be written like this.

So why require Postgres 12 if this specific feature was added in PG11? We'd like to minimize potential for database issues between our environments and what others are running, and we have our eye on a few PG12 only features for potential upcoming changes (specifically around ICU locale sorting and native table partitioning).

Thanks,
Simon

Andrey Gangan

unread,
Apr 7, 2021, 9:43:49 AM4/7/21
to Canvas LMS Users
nice news.
we are using postgresql 13

вторник, 6 апреля 2021 г. в 17:44:31 UTC+3, Simon Williams:

Andrey Gangan

unread,
Apr 8, 2021, 2:52:42 AM4/8/21
to Canvas LMS Users
What about Passenger setting? Which setting do you recomend for high loaded servers?
среда, 7 апреля 2021 г. в 16:43:49 UTC+3, Andrey Gangan:

Simon Williams

unread,
Aug 4, 2021, 1:54:28 PM8/4/21
to Canvas LMS Users
Hey All, we're going to delay requiring PG12 for a few more months to give the community more time to upgrade. We're tentatively now targeting October 27, and we'll confirm for sure as we get closer.

Thanks,
Simon

Nico López

unread,
Aug 5, 2021, 7:57:52 AM8/5/21
to Canvas LMS Users
Thanks for the info! All the communication from Instructure in this group is always welcomed. :)

Graham Ballantyne

unread,
Oct 4, 2021, 1:27:26 PM10/4/21
to 'Zachary Rollyson' via Canvas LMS Users
Hi Simon -- can you confirm that the October 27 release is still the target for requiring PG12?

– 
Graham Ballantyne 
Senior Systems Engineer —  IT Services 
Simon Fraser University

Simon Williams

unread,
Oct 7, 2021, 11:45:44 AM10/7/21
to canvas-l...@googlegroups.com
Hi Graham,

Thanks for following up. Yes, we’ve run into a couple things that have been difficult to maintain support for in PG 9.5 over the last couple months, so I think at this point we need to go forward with the plan to start requiring PG12, starting with the 2021-10-27 release.

Thanks,
Simon

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/canvas-lms-users/4C3F2974-BA6E-4E42-A0DF-8E7F5F295A31%40sfu.ca.

Andrey Gangan

unread,
Oct 18, 2021, 6:57:06 AM10/18/21
to Canvas LMS Users
it would prefer postgersql 14 and use all possible improvements

четверг, 7 октября 2021 г. в 18:45:44 UTC+3, Simon Williams:

Simon Williams

unread,
Oct 18, 2021, 10:56:16 AM10/18/21
to canvas-l...@googlegroups.com
Hey Andrey,

I believe we’ll be evaluating a PG14 upgrade some time next year, but for now the app is untested on PG14. You’re welcome to try it, but just be aware that all our production and testing is on PG12 at this point in time.

Simon

Reply all
Reply to author
Forward
0 new messages