Blog post

Supabase is now on Postgres 13.3

2021-07-26

5 minute read

From today, new Supabase projects will be on a version of Supabase Postgres that runs on Postgres 13.3. This won't be the only big change however in this version. Here are a few other things that have changed under the hood.

PostgreSQL version 13.3

We've jumped from PostgreSQL 12.0 to PostgreSQL version 13.3, introducing significant performance improvements and some great new functionality. Some changes include:

Supabase Versioning

Our Postgres repo has jumped from 0.15.0 to 13.3.0. From now on, both major and minor versions of Supabase Postgres will follow PostgreSQL. This makes it much easier to ascertain what version of PostgreSQL is installed. In the situation wherein there are no updates to PostgreSQL in between releases, the patch version will be bumped up.

Large System Extensions (LSE) enabled for ARM instances

Disclaimer for self-hosting: This is not available for x86 instances. All instances on the Supabase platform have this enabled by default.

The recent wave of Graviton 2 instances from AWS introduces support for the Large System Extensions (LSE). This looks to greatly enhance application performance through atomics, and improves locking and synchronisation performance across large systems.

Preliminary Benchmarks

Below is a comparison between the ARM versions of Supabase Postgres 0.15.0 and 13.3.0. Both are using m6gd.8xlarge instances and follow the PostgreSQL configuration here. The following configuration of pgbench was used.

pgbench -i -s 150

Running the benchmark with 2, 4, 8, 16, 64, and 128 clients:

pgbench -P 5 -c {num_clients} -j {num_clients} -T 300 -M prepared postgres

PostgreSQL 13.3 performance

Ubuntu 20.04

We have taken the opportunity to upgrade new projects from Ubuntu 18.04 to Ubuntu 20.04. A switch to Ubuntu 20.04 guarantees that the underlying OS of Supabase Postgres is supported by the Canonical team up until the year 2025 (2023 for Ubuntu 18.04).

Built from source

Driven by the need to enable LSE, the underlying PostgreSQL in this version was built from the ground up instead of downloaded binaries. Supabase Postgres can now be easily upgraded whenever a new major or minor version of PostgreSQL is released. When PostgreSQL 14 comes out, expect Supabase Postgres 14 to quickly follow.

New Extensions

pgRouting

An extension of PostGIS, pgRouting provides geospatial routing functionality.

More information can be found here.

wal2json

Converts WAL output into clean and organized JSON objects.

More information can be found here.

Enhanced security

To help combat brute force attacks, fail2ban has now been configured to protect direct connections to Postgres. This applies to both ports 5432 (PostgreSQL) and 6543 (PgBouncer).

IPs get banned for 10 minutes after three failed attempts, and we'll continue to fine-tune and improve the protections applied to the database servers based on evolving traffic patterns.

PostgreSQL bundles

[Coming Soon]

Last but not the least, we're diversifying the images of Supabase Postgres available in the AWS and Digital Ocean Marketplaces.

Instead of a single option, we'll soon offer four configurations of PostgreSQL. Each bundle offers functionality for common use-cases. For example, if you're using Postgres with Serverless functions, you might want to run the PgBouncer bundle. If you want an HTTP API with your Postgres offering you might want to run the PostgREST bundle.

NamePostgreSQLPgBouncerPostgREST
Supabase Postgres
Supabase Postgres: PgBouncer Bundle
Supabase Postgres: PostgREST Bundle
Supabase Postgres: Complete Bundle

Each offering will be available for both the x86 and arm architectures.

Try PostgreSQL 13

Try the new features of PostgreSQL 13.3 today by creating a new project on Supabase.

More Postgres resources

Share this article

Last post

Spot: a video sharing app built with Flutter

27 July 2021

Next post

Supabase Community Day

26 July 2021

Related articles

Postgres Full Text Search vs the rest

Supabase Beta September 2022

Postgres WASM by Snaplet and Supabase

Choosing a Postgres Primary Key

Supabase Beta August 2022

Build in a weekend, scale to millions