postgresql

New adventures in time and space

New adventures in time and space

When in February I received the email with the news that my talk was accepted at the pgcon it took me some time, and several espresso coffee, to realise that I wasn’t dreaming. The pgcon email reached me few days after the same talk was accepted at the pycon nove, the Italy’s nationwide Python conference. The Italian Pycon and the Pgcon are great conferences with amazing speakers and fantastic topics. The sole idea of giving my small contribution it makes me proud and a little scared, because I never talked to an audience composed mostly by fine developers.
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.
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.

pg_chameleon v2.0.0.alpha2 is out

Has been a while since I wrote a post on this blog. I’ve been quite busy on coding pgchameleon’s version 2. I finally managed to release an alpha1 the 11th of November but this release had several issues which prevented the users to have real tests. However, after a week of debugging I’ve released pg_chameleon v2.0.0.alpha2 which is now quite usable. For a complete command line reference and an usage example click here.

Happy birthday pg_chameleon

Today is one year since I started working seriously on pg_chameleon. With this commit I changed the project’s license to the 2 clause BSD and the project’s scope, evolving the project into a MySQL to PostgreSQL replica system. Initially this change was just a try. I needed to synchronise the data between MySQL and PostgreSQL and at that time the only option I had it was to use the MySQL foreign data wrapper, eventually to copy the data locally every now and then.

pg_chameleon 1.3 out

Bugfix emergency release v1.3.1 I discovered a regression when running the init_replica caused by a wrong handling of missing time in master coordinates. Sorry about that. After another round of bug fixes I’ve released the version 1.3 of my pet project pg_chameleon. The package is available on pypi as usual. The changelog is available here. If you have any question/issue to discussI created a community on gitter. Please join! I’ve also added a RELASE_NOTESfile to explain the changes.

Amazing pgug Estonia

Last 30th of May I had the honor to talk at the second Estonia PostgreSQL User Group. My talk was about my pet project pg_chameleon and it went very well. The audience was about 40 people highly interested in the topic and the questions were all around. I’m impressed by the Estonian PostgreSQL User Group. Their organizational skills are amazing, the members interest is very high and they are fantastic friends.

pg_chameleon v1.1 out

Last week I announced the stable release of pg_chameleon as I felt quite confident the tool worked properly. However the murphy law is always ready to teach us we live in an interesting universe. A couple of days after the release I noticed on a server which data were modified seldom a strange replica issue. For some reason at specific moments of the day the inserts replayed on the postgres tables failed with the primary key violation.