Tuesday, November 21

Tag: automation

Back to the Future Pt. 1: Introduction to pg_rewind

Back to the Future Pt. 1: Introduction to pg_rewind

2ndQuadrant, Featured, Giuseppe's PlanetPostgreSQL
Since PostgreSQL 9.5, pg_rewind has been able to make a former master follow up a promoted standby although, in the meantime, it proceeded with its own timeline. Consider, for instance, the case of a switchover that didn't work properly. Have you ever experienced a "split brain" during a switchover operation? You know, when the goal is to switch the roles of the master and the standby, but instead you end up with two independent masters - each one with its own timeline? For PostgreSQL DBAs in HA contexts, this where pg_rewind comes in handy! Until PostgreSQL 9.5, there was only one solution to this problem: re-synchronise the PGDATA of the downgraded master with a new base backup and add it to the HA cluster as a new standby node. Generally, this is not a problem, unless your (more…)
Code coverage stats

Code coverage stats

Alvaro's PlanetPostgreSQL, PostgreSQL
Many years ago, Michelle Caise submitted a patch to generate code coverage reports for the PostgreSQL code base, based on the lcov utility. Although I cannot find any record of an actual patch in the mailing list archives, Peter Eisentraut committed it some time later, and applied further refinements later. Today I'm announcing a new PostgreSQL community service: code coverage reports generated automatically and updated daily using this infrastructure. I explain more details here (more…)
Automating Barman with Puppet: <code>it2ndq/barman</code> (part two)

Automating Barman with Puppet: it2ndq/barman (part two)

Barman, Francesco's PlanetPostgreSQL, PostgreSQL
In the first part of this article we configured Vagrant to execute two Ubuntu 14.04 Trusty Tahr virtual machines, respectively called pg and backup. In this second part we will look at how to use Puppet to set up and configure a PostgreSQL server on pg and back it up via Barman from the backup box. Puppet: configuration After defining the machines as per the previous article, we need to specify the required Puppet modules that librarian-puppet will manage for us. Two modules are required: puppetlabs/postgresql (https://github.com/puppetlabs/puppetlabs-postgresql/) to install PostgreSQL on the pg VM it2ndq/barman (https://github.com/2ndquadrant-it/puppet-barman) to install Barman on backup Both modules will be installed from Puppet Forge. For the puppetlabs/postgresql (more…)
Automating Barman with Puppet: it2ndq/barman (part one)

Automating Barman with Puppet: it2ndq/barman (part one)

Barman, Francesco's PlanetPostgreSQL, PostgreSQL
This is not the first time that 2ndQuadrant has looked at Puppet. Gabriele Bartolini has already written an article in two parts on how to rapidly configure a PostgreSQL server through Puppet and Vagrant, accompanied by the release of the code used in the example on GitHub (https://github.com/2ndquadrant-it/vagrant-puppet-postgresql). (more…)