Problems updating postgresql for Keycloak 23.x

Rico good afternoon, I’m trying to update my db to update to Keycloak 23.x.

I saw your post
https://forum.openremote.io/t/breaking-changes-to-latest-docker-images/904/13?u=mbrizu74
and my question is about the client_id you use (‘2347d8eb-f91a-48b1-98aa-0e631ea0f640’)
Should I change this parameter for the client_id of my implementation?
Thank you very much.

No, I don’t think you have to replace these, as it’s an insert statement for a new Keycloak client.

As I don’t want to break a possible production instance,
I’ll also ping @Rich here to make sure. :wink:

1 Like

Thanks Martin.
The problem I’m having is that it won’t let me insert a new id into the public.client table that has the same client-id and realm-id.

Inside the public.client table there is a restriction:

“uk_b71cjlbenv945rb6gcon438at” UNIQUE CONSTRAINT, btree (realm_id, client_id)

Hi,

If the insert fails due to already existing then maybe you have already have the necessary client and have you tried starting the keycloak image?

Thank you very much for the reply Rich. I have not tried using Keycloack’s 23.x image yet. The current deployment has:

Postgres 15.6.0.4
Proxy 2.9.11.1
Keycloak 18.0.2.1
OR Custom Project with a 2022 image

I have not tried using the 23.x image as I understand it may cause a problem. What I have not done is to check data by data of the current client to see if it matches the necessary modification of the post Breaking Changes to latest docker images - #13 by Rich

I can do that and look to manually modify the data.

Just make sure you have backups of the DB and you can try bringing the postgres and keycloak containers up on their own, IIRC keycloak 23 won’t start if that client doesn’t exist.