Re: p5-dbd-pg

From: Dan Mahoney <>
Date: Thu, 20 Jan 2022 18:13:17 UTC

> On Jan 20, 2022, at 9:38 AM, Christoph Moench-Tegeder <> wrote:
> ## Dan Mahoney (
>> On doing a routine pkg upgrade at the dayjob, the perl module p5-DBD-pg
>> forced an upgrade from postgresql12-client to postgresql13-client (which
>> uninstalled postgresql12-server).
> p5-DBD-Pg uses the "default" postgresql version, which switched from
> 12 to 13 in Octobe r(or with the Quarterly switch, depending on what
> you use).
> If you build your own packages, you could pin the default postgresql
> version according to your needs via the make.conf mechanism, that is
> DEFAULT_VERSIONS+= pgsql=12 as an example.

The whole point of using pkg is that I should not have to build my own packages.

My ticket system was down for several hours while I reinstalled postgresql12 (which uininstalled p5-dbd-pg), dumped a 3.5G db, and then reinstalled postgresql13-server, and reimported, because that's what you have to do when you upgrade postgres.  (I hate this about postgres, but it is what it is).

Worse still, the initial install of p5-dbd-pg pulled in postgres13-client, but DID NOT DELETE postgres12-client or postgres12-server, so I assumed the whole "these things can coexist" problem had been fixed.  As people had said, the actual client is stable -- and besides which, a 13 client can talk to a 12 DB (as it might do over the internet).  The SECOND pkg upgrade then wiped out the postgresql12 stuff.

For a perl module that could be flavored so it works with whatever thing you have installed.  (It doesn't call for a specific version, it just has uses = pgsql).

Had I seen this level of fail coming, I would have deployed on a parallel VM, or done the db dump beforehand, but the initial pkg upgrade did not show it was deleting postgres 12.

Luckily, this ticket system is internal, and we have a process to cache inbound tickets on our border MXes, so it wasn't the end of the world, but it was still annoying.

(We have backups, of course, but they're not down-to-the-transaction).