Skip to main content
Published in Engineering Insights

Gnarly News October 2022: PostgreSQL 15 Release and More

Gnarly News October 2022: PostgreSQL 15 Release and More
Table of contents
  1. Heroku Introduces New Low-Cost Plans
    1. What happened next with Heroku
  2. Adobe to Acquire Figma
    1. How the Figma deal ended
  3. TypeScript Turns Ten
  4. Turbo 7.2 is Released
  5. Postgres 15 is Released
    1. PostgreSQL 15 release highlights
    2. How MERGE works
    3. Upgrade notes: the public schema change
    4. Is PostgreSQL 15 still supported?
    5. Contributors

This October 2022 roundup is for developers and engineering leads who want the short version of that month's news and how each story turned out. It covers five items: Heroku's new low-cost plans, Adobe's deal for Figma, TypeScript's tenth birthday, Turbo 7.2 and the PostgreSQL 15 release. Each item says what happened and why it mattered to teams building software. Where we now know how a story ended, we added that too, with the source.

The software development landscape is constantly changing. As a software consultancy, it's our responsibility to keep our finger on the pulse of the industry. Here are some headlines that caught our attention recently.

Heroku Introduces New Low-Cost Plans#

This past summer Heroku announced their "Next Chapter" which includes discontinuing free product plans, free dynos, and data services like Heroku for Redis. This sent shockwaves through the community as the free services are often used for personal projects and staging environments. Initially, like many others, we assumed that this could lead to a large-scale migration away from the hosting giant. But now we're not so sure! Heroku recently publicized some reasonably priced plans that will likely be viable for most non-production projects. We're really excited to follow this journey and to check out some of the new offerings, which should be available in the coming months.

What happened next with Heroku#

Heroku introduced the new plans in November 2022, according to its 2022 year-end roundup. Eco dynos sleep when there is no web traffic, so they only use hours while active. Mini plans covered Heroku Postgres and Heroku Data for Redis. Heroku also joined the GitHub Student Developer Pack so students could keep using it, and it ended the old free plans for dynos, Postgres and Redis in December 2022.

Adobe to Acquire Figma#

Design giant Adobe recently announced that it will acquire Figma, one of its leading competitors, for $20 billion. We love the collaborative environment that Figma provides and we have our concerns that Adobe will dilute and/or pick apart the product once the sale is complete, just like what happened with Macromedia back in 2005. 😪Time will tell!

How the Figma deal ended#

Time did tell. On December 18, 2023, Adobe and Figma agreed to terminate the merger agreement first announced on September 15, 2022. The companies said there was no clear path to regulatory approval from the European Commission and the UK Competition and Markets Authority. Figma moved forward as an independent company.

TypeScript Turns Ten#

Ahh yes, 2012. Some thought the world was ending, others were reeling over the thought of introducing static types in JavaScript after Microsoft's announcement of their newest language: TypeScript. A lot has changed over the years but TypeScript continues to be a tool we reach for over and over again. Thanks for keeping us (mostly) sane, and Happy Birthday, TypeScript! 🎂🎉

Turbo 7.2 is Released#

David Heinemeier Hansson (DHH), the creator of Ruby on Rails, recently tweeted that Turbo 7.2 has been released. The project, originally released in November 2021, has received a ton of attention and has been largely embraced by the Ruby on Rails community. The adoption is evident if read through the included fixes and new features: this release is a chonker! We've been using Turbo in a handful of our applications and we're stoked to see these improvements come over the wire.

Postgres 15 is Released#

Postgres 15 was released this month, marking their 32nd major release. You can check out the official release notes here, but there are a few interesting features that stood out to us including new regular expression function for inspecting strings, faster sort performance, and the long-awaited MERGE command that allows you to conditionally insert, update, or delete rows of a table. And as a bonus, it just so happens that The Gnar's very own Steve Zelaznik started a blog post series on a bunch of neat Postgres features that you should definitely check out. Coincidence? 🤔

PostgreSQL 15 release highlights#

The PostgreSQL Global Development Group announced the PostgreSQL 15 release on October 13, 2022. The headline features were the MERGE command, faster sorting, new regular expression functions, more control over logical replication and a JSON log format. The table below lists the changes most teams noticed first, in plain terms.

FeatureWhat it does
MERGERuns INSERT, UPDATE and DELETE actions in one conditional statement against a target table
Regular expression functionsregexp_count, regexp_instr, regexp_like and regexp_substr inspect strings
Faster sortingImproved in memory and on disk sort algorithms, and SELECT DISTINCT can run in parallel
WAL compressionLZ4 and Zstandard compression of full page writes in the write-ahead log, set with wal_compression
Logical replicationRow filtering and column lists let a publisher replicate part of a table
Security invoker viewsA view can query data with the permissions of the caller instead of the view creator
JSON loggingA new jsonlog format writes logs in a defined JSON structure
psql configuration searchThe new \dconfig command searches server configuration from psql

How MERGE works#

MERGE compares rows from a source with rows in a target table. Each WHEN clause says what to do when a row matches or does not match: update it, delete it, or insert a new row. Before version 15, teams often used INSERT with ON CONFLICT, which can insert or update on a unique key conflict but cannot delete in the same statement.

SQL
MERGE INTO inventory t
USING shipments s ON t.sku = s.sku
WHEN MATCHED THEN
  UPDATE SET quantity = t.quantity + s.quantity
WHEN NOT MATCHED THEN
  INSERT (sku, quantity) VALUES (s.sku, s.quantity);

Upgrade notes: the public schema change#

PostgreSQL 15 removes the PUBLIC creation permission on the public schema, so by default only the database owner can create objects there. The release notes say that upgrading a cluster or restoring a database dump keeps the existing permissions, so the new default shows up in new clusters and new databases. Moving data to version 15 requires a dump and restore using pg_dumpall, an upgrade using pg_upgrade, or logical replication. The release also removes the long deprecated exclusive backup mode and PL/Python support for Python 2.

For a production system, test the upgrade on a copy first. Check any migration or script that creates tables in the public schema as a user other than the owner, since that is the change most likely to raise a permission error.

Is PostgreSQL 15 still supported?#

Yes, until November 11, 2027. The PostgreSQL versioning policy lists that date as the final release for version 15, counted from its initial release on October 13, 2022. Until then, each major version gets bug fixes and security fixes in a regularly scheduled minor release. If the release team determines that a critical bug or security fix cannot wait, it can ship a release outside the minor release roadmap. After the final minor version, version 15 is no longer supported.

Minor release upgrades do not need a dump and restore: stop the server, install the new binaries and restart. Moving from 15 to a newer major version, such as 18, takes a dump and reload or pg_upgrade. You can skip intervening major versions, and the project recommends reading the release notes of each one before you do.

Contributors#

Learn more about how The Gnar builds software.

Frequently asked questions

Why did Heroku's free-plan changes matter?

The free services were often used for personal projects and staging environments. The newly announced plans made Gnar less certain that users would leave in large numbers. Heroku later introduced Eco dynos and Mini plans for Postgres and Redis in November 2022.

What did MERGE add in Postgres 15?

MERGE lets one SQL statement compare source rows with a target table and insert, update or delete rows depending on whether they match. Each WHEN clause sets the action. Before PostgreSQL 15, INSERT with ON CONFLICT could insert or update but not delete in the same statement.

Had Gnar used Turbo before the 7.2 release?

Yes. Gnar had used Turbo in a handful of applications and was pleased to see the release's fixes and features. Turbo first shipped in November 2021 and was widely taken up by the Ruby on Rails community.

What changed for the public schema in PostgreSQL 15?

PostgreSQL 15 removed the PUBLIC creation permission on the public schema, so by default only the database owner can create objects there. Upgrading a cluster or restoring a dump keeps the old permissions, so the change mainly affects new clusters and new databases.

Did Adobe complete its acquisition of Figma?

No. Adobe and Figma agreed to terminate the merger agreement on December 18, 2023. They said there was no clear path to approval from the European Commission and the UK Competition and Markets Authority, and Figma continued as an independent company.

When did PostgreSQL 15 come out?

The PostgreSQL Global Development Group released PostgreSQL 15 on October 13, 2022. The release added the MERGE command, new regular expression functions, faster sorting, structured JSON logging and a safer default for the public schema.

When does PostgreSQL 15 support end?

On November 11, 2027. The PostgreSQL versioning policy lists it as the final release for version 15. Until then it gets bug fixes and security fixes in regular minor releases, and after that date it is no longer supported.

Stay In The Loop

Never miss an update. Get the latest blogs, webinars, and expert insights straight to your inbox from The Gnar.