Dev Corner: error context stack corruption

PostgreSQL uses error context callbacks to allow code paths to annotate errors with additional information. For example, pl/pgsql uses them to add a CONTEXT message reporting the procedure that was executing at the time of the error. But if you get it wrong when you use one in an extension or a patch to core, […]

Using Multimaster and BDR appropriately – LinuxConfAu

Unless you were in Sydney for 2018 last week you probably didn’t see my talk Geographically distributed multi-master replication with PostgreSQL and BDR. Luckily for you it’s on and YouTube. If you’re interested in multi-master replication of any sort, even non-PostgreSQL-based multi-master, it should be worth taking a look. The talk could’ve been […]

Plan for the unexpected: install diagnostic tools on your PostgreSQL servers

There’s a lot of information out there on how to configure PostgreSQL, on the importance of backups and testing them, etc. But what about the server you run PostgreSQL on? We tend to pay a lot less attention to tools that you won’t need unless something breaks. But it’s worth taking some time to do […]

Transaction traceability in PostgreSQL 10 with txid_status(…)

One feature quietly added to PostgreSQL 10 is the ability to determine the commit status of any transaction by transaction-id. It’s reasonable to wonder why you’d want this, since you know if you committed the transaction, it’s still in progress, or if you or rolled it back. And you can check for in-progress transactions in […]

Using the PostgreSQL TAP framework in extensions

Support for using the TAP protocol to run extended regression tests was added to PostgreSQL back in 9.4 with the adoption of Perl’s prove tool and Test::More to test initdb, pg_basebackup, etc. Since then the TAP-based tests have been greatly expanded, particularly with the advent of the src/test/recovery tests and the PostgresNode module in PostgreSQL […]

Traceable commit for PostgreSQL 10

PostgreSQL 10 now supports finding out the status of a recent transaction for recovery after network connection loss or crash.

Re-import repository keys for BDR and pglogical apt repositories

The BDR and pglogical apt repository GnuPG signing keys have been renewed. Users should re-import the existing keys. You can verify that it’s still the same key as referenced in the documentation, just with a later expiry date. Simply run: wget –quiet -O – | sudo apt-key add – sudo apt-key finger AA7A6805 | […]

BDR History and future

BDR is both a patch to PostgreSQL core and an extension on top of PostgreSQL core. How did that come about, and what’s it’s future? Development of BDR was initiated around the time PostgreSQL 9.2 was in development. Arguably earlier if you count things like the extension mechanism. The goal of BDR is, and has […]

BDR is coming to PostgreSQL 9.6

I’m pleased to say that Postgres-BDR is on its way to PostgreSQL 9.6, and even better, it works without a patched PostgreSQL. BDR has always been an extension, but on 9.4 it required a heavily patched PostgreSQL, one that isn’t fully on-disk-format compatible with stock community PostgreSQL 9.4. The goal all along has been to […]

BDR 1.0

I’m pleased to say that we’ve just released Postgres-BDR 1.0, based on PostgreSQL 9.4.9. This release contains significant improvements to DDL replication locking, global sequences, documentation, performance, and more. It also removes the deprecated UDR component in favour of