DragonFlyBSD / DPorts

The dedicated application build system for DragonFly BSD
Other
89 stars 44 forks source link

Upgrade failure trying to install conflicting postgresql-client versions #45

Closed ftigeot closed 11 years ago

ftigeot commented 11 years ago

I recently tried to upgrade a database server running Postgres-9.1 For some reason, pkg upgrade decided to install postgresql-client 9.0 besides the already present 9.1 version:

The following packages will be upgraded: Reinstalling postgresql-client-9.1.9 Installing postgresql-client: 9.0.13 [...]

The upgrade predictably failed with many conflicting files:

[...] Conflict found on path /usr/local/bin/clusterdb between postgresql-client-9.0.13(databases/postgresql90-client) and postgresql-client-9.1.9(databases/postgresql91-client) [...]

jrmarino commented 11 years ago

isn't this a (now) well-known limitation of pre-built binaries? pkgsql 90 willl always try to be installed since it's the defined default.

ftigeot commented 11 years ago

I figured this case was special since pkg attempts to install both 90 and 91 versions of postgresql-client, introducing a conflict.

jrmarino commented 11 years ago

hmm, that does look strange.

jrmarino commented 11 years ago

Should dports just make the latest release of postgresql always the default version? I don't think I agree 90 should be default.

ftigeot commented 11 years ago

Postgres-91 seems to be the most widely version for now. Maybe we should switch the default to 91 and then again to 92 in a year or so ?

jrmarino commented 11 years ago

given that postgresql is backwards compatible, why wouldn't we just go straight to 92? There's going to be this issue no matter which pgsql is default, so to minimize it, the most likely database should be default so that nobody installs other versions.

The other fix, the one that would really work, is to only offer 1 version of pgsql. Having multiple versions is the real issue.

ftigeot commented 11 years ago

It's not, upgrading between .1 versions requires a complete database dump + restore.

jrmarino commented 11 years ago

That's not what I mean. I mean any software that requires 91 can use 92. I'm not talking about updating a live database, I'm talking about adding a database server the first time.

ftigeot commented 11 years ago

jrmarino wrote:

That's not what I mean. I mean any software that requires 91 can use 92. I'm not talking about updating a live database, I'm talking about adding a database server the first time.

I've no objection to making 92 the new default.

Upgrades from non-92 will still break but most upgrades are already broken anyway...

Francois Tigeot

jrmarino commented 11 years ago

I asked at #bsdports why there were still on 90, apparently there is no reason other than nobody has changed the default. So I propose moving to 92 as default.

jrmarino commented 11 years ago

The latest master branch has 92 defined as the default, so the upcoming packages should be linked with postgres 92 now.