Re: Another morning lost to bad ports choices (perl upgrade, plus postgres)

From: <list_freebsd_at_bluerosetech.com>
Date: Tue, 12 Dec 2023 18:35:15 UTC
On 2023-12-12 6:16, Piotr Smyrak wrote:
> On Tue, 12 Dec 2023 04:01:23 -0800
> list_freebsd@bluerosetech.com wrote:
> 
>> On 2023-10-24 15:12, Dan Mahoney (Ports) wrote:
>>> Yes, I know that I should be ready to upgrade to 15 at some point,
>>> on whatever quarterly port boundary it's decided, "I guess that's
>>> when", with no advance notice, via the full stupid dump-and-restore
>>> process.
>>
>> I know it's too late now, but run postgresql-server in its own jail.
>> Among other administrative advantages, it splits the
>> postgresql-client dependency tree so you don't have to upgrade your
>> database server every time the Ports Tree bumps PGSQL_DEFAULT.
>> PostgreSQL clients tend to have excellent backward compatibility, so
>> as a rule the server just needs to be a supported version.
>>
> 
> Or you can diverge the PGSQL_DEFAULT between server and client:
> 
> .if ${.CURDIR:M*/databases/postgresql${YOUR_FAV_SERVER_VERSION}-server}
> PGSQL_DEFAULT=foo
> .endif

The correct incantation would be "DEFAULT_VERSIONS+= pgsql=foo".  You'd 
also have to set it for everything that uses pgsql and rebuild all of 
those ports.  That introduces the risk of dependency mismatches unless 
you use a build-in-quarantine system like poudriere and install only 
from a private repo.

The cheap workaround is running postgresql-server in a jail so it 
doesn't have to chase PGSQL_DEFAULT with the rest of the system.