You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've tried to update to the v0.23 release and I received the following error:
{"level":"fatal","error":"LastInsertId is not supported by this driver","time":1708000343,"message":"Migration failed: LastInsertId is not supported by this driver"}
Just to make sure, I've updated Postgres to the latest 16.x version, but I'm still receiving this error message.
I'm not certain what LastInsertId should do, I'm guessing it should return the latest used sequential number on INSERT? Since it doesn't seem supported by Postgres, I would maybe suggest looking into RETURNING (see PostgreSQL - INSERT) if there is no simpler workaround.
The optional RETURNING clause causes INSERT to compute and return value(s) based on each row actually inserted [...]. This is primarily useful for obtaining values that were supplied by defaults, such as a serial sequence number.
Environment
Version of headscale used: headscale/headscale:0.23.0; Postgres 15.x and 16.x
Headscale is behind a (reverse) proxy (envoyproxy/envoy:v1.29.1)
Headscale runs in a container
To Reproduce
Have an existing (working) installation using PostgreSQL
Update the config to accommodate for the breaking changes (db_* -> database.postgres.*) and set the database to postgres again.
Update the command in docker from ´headscale servetoserve`
Deploy the new version
See error messages in logs
Logs and attachments
(Headscale doesn't start)
Host Headscale
Linux acme 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64 GNU/Linux
Docker version 25.0.1, build 29cf629
ID NAME CORES CPU TYPE ARCHITECTURE MEMORY DISK STORAGE TYPE TRAFFIC
1 cx11 1 shared x86 2.0 GB 20 GB local 20 TB
Host Postgres
Linux pg01 6.1.0-17-arm64 #1 SMP Debian 6.1.69-1 (2023-12-30) aarch64 GNU/Linux
Docker version 25.0.1, build 29cf629
ID NAME CORES CPU TYPE ARCHITECTURE MEMORY DISK STORAGE TYPE TRAFFIC
93 cax21 4 shared arm 8.0 GB 80 GB local 20 TB
The text was updated successfully, but these errors were encountered:
Bug description
Hi, I've tried to update to the v0.23 release and I received the following error:
Just to make sure, I've updated Postgres to the latest 16.x version, but I'm still receiving this error message.
I'm not certain what
LastInsertId
should do, I'm guessing it should return the latest used sequential number onINSERT
? Since it doesn't seem supported by Postgres, I would maybe suggest looking intoRETURNING
(see PostgreSQL - INSERT) if there is no simpler workaround.Environment
headscale/headscale:0.23.0
; Postgres 15.x and 16.xenvoyproxy/envoy:v1.29.1
)To Reproduce
db_*
->database.postgres.*
) and set the database topostgres
again.to
serve`Logs and attachments
(Headscale doesn't start)
Host Headscale
Linux acme 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64 GNU/Linux
Docker version 25.0.1, build 29cf629
Host Postgres
Linux pg01 6.1.0-17-arm64 #1 SMP Debian 6.1.69-1 (2023-12-30) aarch64 GNU/Linux
Docker version 25.0.1, build 29cf629
The text was updated successfully, but these errors were encountered: