Build your own aggregate

Build your own aggregate

Before the release of pg_chameleon 2.0 I had to write an upgrade procedure to allow a smooth migration from the version 1.8.

An interesting challenge I faced was to determine the maximum and minimum position for the MySQL’s binary logs belonging to the same server but stored with different values in multiple sources.

The user defined aggregates, a feature pretty unique to PostgreSQL, allowed me to solve the problem in a robust and simple way.

Checkpoints and wals, fantastic beasts (and where to find them)

Checkpoints and wals, fantastic beasts (and where to find them)

Back in the days of when I was an Oracle DBA I had to solve a strange behaviour on an Oracle installation. The system for some reasons stopped accepting the writes occasionally and without an apparent reason. This behaviour appeared odd to anybody except for my team, which addressed the issue immediately. The problem was caused by a not optimal configuration on the Oracle instance. This thought led me to writing this post.
Le peloton

Le peloton

Few years ago I went trough a massive frustration. My team aligned with the rest of the company in using the Agile methodology. Initially the team decided to use Scrum then it switched to a sort of kanban. However even both approaches failed miserably dropping the team in utter chaos. I remember the daily standups. It was like playing a stage role, people stated the tasks for the day knowing that that task would be not the one the will work on it.
Nobody expects the spanish inquisition

Nobody expects the spanish inquisition

An ancient italian proverb says Il backup è quella cosa che andava fatta prima. A rough translation could be something like this: the backup is the thing that had to be done before. The concept of backup is quite confusing. Some people wrongly believe that executing a local backup is sufficient to ensure the recover of the data. In the real world a valid backup is present only if three conditions are true.
Fun with pgbackrest

Fun with pgbackrest

pgbackrest is an amazing tool that saves entire PostgreSQL clusters with ease. In this post we’ll go trough the configuration of the backup using a remote backup server. For the extensive documentation and detailed instructions please refer to the user guide. operating system configuration For our example we’ll use two virtual machines on virtualbox with devuan 1.0 Jessie installed. Each machine is configured in the same way. 1 cpu 1 GB ram Hard disk of 12 GB with single partition ext4 sshd up and running The machines have one bridged network adapter eth0.