postgres.scot is live, August PostgresEDI meetup
postgres.scot is live!
Postgres events in Scotland now have a permanent address: postgres.scot
It is a deliberately small page. Right now it points at the PostgreSQL Edinburgh User Group (PostgresEDI) on cloomba, where you will find RSVPs, a calendar subscription and an RSS feed, and it will carry other Scottish Postgres events as they come along. The point is to have one address worth bookmarking and sharing, rather than whichever platform we happen to be on this year.
If you are running something Postgres-related in Scotland and want it listed, email info (at) postgres.scot.
postgres.scot is a volunteer website, not affiliated with or endorsed by the PostgreSQL project or the PostgreSQL Community Association.
The August meetup
Thursday, August 13th, Paterson's Land at the University of Edinburgh, two talks, pizza and refreshments sponsored by pgEdge, and the rest of the evening at the Tolbooth Tavern, one of the few pubs nearby that was not hosting an Edinburgh Fringe show that night.
Logical Replication: Escape the Cloud, Own Your Data
Torsten Förtsch
Torsten Förtsch on replaying the stream of changes into the target database
Torsten started from a move to Aurora and the question of what "your data" actually means once the database is somebody else's service. His answer was to rebuild point-in-time recovery at the logical level: a pg_dump for the base copy, a stream of changes captured with wal2json in place of archived WAL segments, and replay into a database you control, on whatever operating system and Postgres version you like.
He took us through both halves of that. Capture and replay turned out to be 35 lines of jq translating the JSON change stream into SQL statements, with some care over how those statements are written so they find the right row quickly. The harder half is the initial copy: working out which position in the stream a dump corresponds to, so that replay starts in exactly the right place. He finished with where he wants to take it, including releasing it as open source.
📊 View the slides: OwnYourPG: A journey in logical replication (PDF)
Expressive Representations of Missing Values in Relational Database Systems
Paolo Guagliardo (University of Edinburgh)
Paolo Guagliardo on why comparing a column with itself can drop rows
Paolo opened with the example that has caught out everyone who has written SQL against real data. Given a Person table where Jane and John have a NULL age and Mary and Carl are 30 and 23:
SELECT Name FROM Person WHERE Age = Age;
You get Mary and Carl. A condition that compares a column with itself still drops half the table, because comparing a NULL with anything, including another NULL, gives unknown rather than true.
Underneath that is a harder problem: SQL has exactly one NULL, so there is no way to record that two unknown values are the same unknown value. Marked nulls, a long-standing idea in database theory, do exactly that, but putting them into a real database engine is another matter. Paolo took us through an implementation in PostgreSQL, the parts of standard SQL that turn out not to be up to the job, and measurements of the storage overhead it adds on TPC-H and TPC-DS data.
📊 View the slides: Expressive Representations of Missing Values in Relational Database Systems (PDF)
Two NULLs, two unknown ages, and no way to say whether they are the same
Next: Thursday, September 24th
We'll be back in Paterson's Land, room 1.27 this time, doors at 18:00. I will be presenting ColdFront, which tiers cold Postgres data out to Apache Iceberg on object storage while the rows stay readable from Postgres. A second talk is still to be confirmed.
Register here: 👇
We are still looking for speakers, for September and beyond. First-time speakers are very welcome, and a meetup talk is a low-pressure way to start. Drop me an email at vyruss000 (at) gmail.com.
- Events in Scotland: postgres.scot
- LinkedIn: linkedin.com/company/postgresedi
- Mastodon: @PostgresEDI@fosstodon.org
- Bluesky: @postgresedi.bsky.social
Thanks to Torsten and Paolo for the two talks, and to the University of Edinburgh for the room. See you on the 24th! 🍕
/ blog