[Dachs-support] DaCHS reinstallation fails
Markus Demleitner
msdemlei at ari.uni-heidelberg.de
Mon May 10 13:06:15 CEST 2021
Rasmus,
On Mon, May 10, 2021 at 08:45:28AM +0000, Rasmus Handberg wrote:
> I've had to upgrade my server where DaCHS is running (Debian 10), but
> when I have to reinstall DaCHS I get the following errors.
>
> It looks like it is because the postgres database is already set up
> (from the last installation), but how to I proceed then?
That is not the problem here; the corresponding messages are spurious
but not easy to hide without risking hinding relevant errors in other
situations.
But there is a bad one here:
> *** Error: While executing DB query:
>
> CREATE EXTENSION pg_sphere
>
> the database engine reported:
>
> ERROR: function "spoint_in" already exists with same argument types
>
Oh, dang. There ma be more pgspheres out there that we had reckoned
with; you see, a postgres extension has metadata that says something
like "to upgrade from version A to version B, do X, Y, and Z", and
this sort of error happens when there's been a Y out there and you
don't give the corresponding recipe.
But, since DaCHS apparently tries to create the extension, could it
be this is a really old pgsphere predating postgres' current
extension mechanism? Let's see: Does
psql gavo -c "select * from pg_extension where extname='pg_sphere'"
output something? If not, you can run
psql gavo -c "create extension pg_sphere from unpackaged"
after which an
sudo apt-get -f install
should fix everything (if so, would you briefly give me a signal to
that effect so I can see if I can amend the docs a bit?).
If the result of the extension query is not empty, the problem is to
remove the offending (and conflicting) declaration. Dropping
pgsphere *would* fix it, but that'll take all tables with pgsphere
objects in them with it. This may not concern you at all, but then
it might, and hence it'd be great if we could work out what the
actual problem was. Could you hunt for a promising-looking error
message (that would involve spoint) in the postgres logs
(/var/log/postgresql)?
Thanks,
Markus
More information about the Dachs-support
mailing list