#​533 — December 6, 2023

Web Version

Together with  EDB

Postgres Weekly

Tips and Tricks for Doing Advent of Code in Postgres — The annual Advent of Code programming competition is back! Greg is an old hand at using SQL and PL/pgSQL to solve the challenges, so if you want to give it a try too, here he explains how to get started and some Postgres-specific tips and tricks (which are useful for other tasks too!)

Greg Sabino Mullane

Lower Your Cloud Spend and Increase Postgres Performance on AWS — If you’re struggling with increasing costs and decreasing performance of AWS RDS or Aurora, it’s time to look at EDB Postgres. Benefits include: high availability options and always available Postgres experts, Oracle compatibility and transparent pricing. AWS+EDB Postgres are better together.

EDB Postgres sponsor

Everyone's Postgres Event Experiences — As part of the latest PGSQL Phriday blogging event, many Postgres users wrote about their experiences going to various Postgres meetups and conferences. If you’ve never been to any, you might find the writeups illuminating. Michael Christofides shared his thoughts, Claire Giordano produced an epic illustrated guide to Postgres at PASS Data Summit 2023, Postgres.fm did ▶️ an hour long show on events, and more besides. There’s a lot to enjoy here.

Pavlo Golub et al.

IN BRIEF:

Can You Extract SQL from the WAL? — Given a wal_level of “replica”, is it at all possible to extract SQL from such WALs? Not usually, says Julien in this first of a series of posts, but if you dig deep, there are many useful things you can extract.

Julien Rouhaud

One Team's Postgres Database Optimization Story — It’s a tale as old as time: you launch an app, it gets popular, and the database starts to show the strain. This is how one team monitored what was going on and introduced some fixes.

Miroslav Bajtoš

Closing Cursors — Tools like Ora2Pg make it possible to port Oracle data, procedures and functions to Postgres, but with any big architectural change, subtle differences can cause curious outcomes, as here.

Pavel Stěhule

💡 Related to this, Pavel has released v2.7 of the plpgsql_check PL/pgSQL in order to warn you about unclosed cursors in procedures.

Create a Fast Time-Series Graph with Materialized Views — Starts with the Postgres approach, before moving on to Timescale’s continuous aggregates.

Dylan Paulus (Timescale)

Code and Tools

pgxman: It's Like npm for Postgres — Postgres has a rich ecosystem of extensions (PGXN offers one way to follow them) but installing them can be tricky. There have been numerous attempts at cleaning things up, such as Supabase’s dbdev, and Hydra is having a go with pgxman (‘Postgres Extension Manager’) which takes a more npm-esque approach.

Joe Sciarrino (Hydra)

Six Things to Monitor with PostgreSQL

Redgate sponsor

pguint: An Unsigned Integer Types Extension — Brings signed 8 bit integer and unsigned 8, 16, 32, and 64 bit integer types to Postgres 9.1+ (64 bit platforms only).

Peter Eisentraut

check_pgactivity 2.7: A Postgres Plugin for Nagios — If you use Nagios for monitoring, use this to have it monitor Postgres as well. v2.7 adds Postgres 15/16 support.

OPM Development Group

PLV8ify: Turn JavaScript Files into PLV8 Functions — Bundles TS/JS input and writes SQL containing Postgres functions using the PLV8 extension. Appears to be in its early stages.

Divyendu Singh