Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

Postgres storage initialization failure: Message: ERROR: relation "maps_idx" already exists

bradydean opened this issue ยท 2 comments

commented

I'm trying to use Postgres as the storage backend. The first time I booted the server up the logs indicated the storage backend successfully created the db schema. After rebooting the server, I get an uncaught exception about initializing the storage backend.

I'm using the postgres:14 docker image. I have added a dynmap user, dynmap database, and granted role dynmap all privileges on database dynmap. The paper instance is deployed in a amazoncorretto:18 docker image.

[X] I have looked at all other issues and this is not a duplicate
[X] I have been able to replicate this

commented

In my first-boot logs I have

[23:50:34 INFO]: [dynmap] Initializing database schema
[23:50:35 INFO]: [dynmap] Schema version = 4
[23:50:35 INFO]: [dynmap] Mod Support processing completed

However, select * from schemaversion shows level=3. This may explain why the error logs say it's trying to migrate from schema version 3.

EDIT: I read through the code which migrates the db and since version 4 only adds the index, and considering it's already created, I manually updated level to 4 and it appears to be working now.

commented

already found in #3765 and they created a patch for it, the most recent version of dynmap should have the fix implemented.
If you find that to not be the case you can go ahead and reopen this issue.