New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade PostgreSQL 9.4 to 11 or 12 #2801
Comments
can i take this issue ? |
@ibrahimelbanna this is more a ticket to start a discussion than an actual issue (my bad for not labelling this correctly from the start). If the discussion has a positive outcome and the upgrade is given a go, then DEV Heroku's DB will have to be manually upgraded using Heroku's upgrade guide. After that I'm sure you can work on a PR to upgrade the minimum required version. I've been running DEV locally on PostgreSQL 11 for months and I know it it works (there are no breaking changes between all of these releases), what version do you have locally? |
Closing this because we're officially on PostgreSQL 11 🎉 |
DEV uses/requires PostgreSQL 9.4. I'm opening this ticket to invite a discussion about upgrading PostgreSQL to 11 or 12.
Between PostgreSQL 9.4 and 12 there are five major versions: 9.5, 9.6, 10, 11 and 12.
EOL dates:
I've chosen to highlight features that might benefit DEV in the short term. I omitted main news like logical replication (replication of a subset of tables) and hash partitioning (partitioning data with roughly evenly distributed partitions) because I believe they are not relevant right now, though they might matter in the future.
I've used PostgreSQL for many years and I've always found it extremely stable, I've also been using DEV locally with PostgreSQL 11 since its release in October 2018 without any issue.
What's new in PostgreSQL 9.5
Aside for many bug, performance and security fixes these are some relevant news from PostgreSQL 9.5 that might help DEV:
INSERTs that ON CONFLICT can be transformed into UPDATEs
The guarantee that PostgreSQL 9.5 makes is that an
INSERT ... ON CONFLICT DO UPDATE
is done atomically, so both the insert and the update are a single operationWhat's new in PostgreSQL 9.6
Aside for many bug, performance and security fixes these are some relevant news from PostgreSQL 9.6 that might help DEV:
Parallel execution of sequential scans, joins and aggregates
This is self explanatory, PostgreSQL 9.6 is the first major version to introduce paralellism in queries and aggregations. Such paralellism has been greatly expanded in versions 10, 11 and 12.
What's new in PostgreSQL 10
Aside for many bug, performance and security fixes these are some relevant news from PostgreSQL 10 that might help DEV:
Full text search on json columns
FTS in PostgreSQL is already a cool feature, but now it's possible to search json/jsonb columns as well (example taken from postgresql.org):
Improved parallel queries
They have done a lot of work improving parallelism for queries. Some types of joins and index scans are executed in parallel:
Improved monitoring on DB activity
pg_stat_activity
shows the background processes operating on the DB and more information about what's going on.Add IDENTITY columns
They added the type
IDENTITY
which is similar to the data typeSERIAL
but is compliant with the SQL standard.What's new in PostgreSQL 11
Aside from many bug, performance and security fixes these are some relevant news from PostgreSQL 11 that might help DEV:
Improved support for parallel operations
ALTER TABLE ADD COLUMN NOT NULL with DEFAULT runs in constant time
This is huge! PostgreSQL addition of a column is affected by the size of the table itself because it essentially has to rewrite the table.
PostgreSQL 11 guarantees constant time if asked to add a non null column with a default (a constant default) which means it's unaffected by the table size and runs fast.
Covering indexes
Basically you can attach additional columns to an index, to avoid going back to the heap for the often required columns that are not part of the index itself. Useful in case of related data that's queried all the time with the indexed column(s)
What's new in PostgreSQL 12
Aside for many bug, performance and security fixes these are some relevant news from PostgreSQL 12 that might help DEV:
Some of these are truly awesome!
How to upgrade on Heroku
Heroku has a detailed (yet simple) guide on how to do it. It does require some downtime (around 10 minutes for the first method, around 3 minutesp per GB for the second): Upgrading the Version of a Heroku Postgres Database
Since it requires downtime it should be carefully planned and notified.
Resources
The text was updated successfully, but these errors were encountered: