[Bug] v0.23 does not work with PostgreSQL #716

Closed
opened 2025-12-29 02:22:47 +01:00 by adam · 1 comment
Owner

Originally created by @simonszu on GitHub (May 25, 2024).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The startup of 0.23 apparently requires a certain postgresql database schema which is not present, even when upgrading from a 0.22 installation. It shows this error in the logs:

FTL Migration failed: FEHLER: Spalte »last_successful_update« von Relation »nodes« existiert nicht (SQLSTATE 42703) error="FEHLER: Spalte »last_successful_update« von Relation »nodes« existiert nicht (SQLSTATE 42703)"

Which roughly translates as "column last_successful_update from relation nodes does not exist".

This error occurs on a completely new database as well as upgrading from a 0.22 installation with an already pre-populated database (a tailnet and some nodes are present).

Expected Behavior

The headscale container comes up just fine, or is able to successfully complete the migration.

Steps To Reproduce

  1. Configure headscale to use postgres instead of sqlite
  2. Start a 0.23 container

Environment

- OS:Debian Bookworm
- Headscale version: 0.23.0-alpha11 and -alpha12
- Tailscale version: Does not matter yet

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

No response

Originally created by @simonszu on GitHub (May 25, 2024). ### Is this a support request? - [X] This is not a support request ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior The startup of 0.23 apparently requires a certain postgresql database schema which is not present, even when upgrading from a 0.22 installation. It shows this error in the logs: ``` FTL Migration failed: FEHLER: Spalte »last_successful_update« von Relation »nodes« existiert nicht (SQLSTATE 42703) error="FEHLER: Spalte »last_successful_update« von Relation »nodes« existiert nicht (SQLSTATE 42703)" ``` Which roughly translates as "column last_successful_update from relation nodes does not exist". This error occurs on a completely new database as well as upgrading from a 0.22 installation with an already pre-populated database (a tailnet and some nodes are present). ### Expected Behavior The headscale container comes up just fine, or is able to successfully complete the migration. ### Steps To Reproduce 1. Configure headscale to use postgres instead of sqlite 2. Start a 0.23 container ### Environment ```markdown - OS:Debian Bookworm - Headscale version: 0.23.0-alpha11 and -alpha12 - Tailscale version: Does not matter yet ``` ### Runtime environment - [ ] Headscale is behind a (reverse) proxy - [X] Headscale runs in a container ### Anything else? _No response_
adam added the bug label 2025-12-29 02:22:47 +01:00
adam closed this issue 2025-12-29 02:22:47 +01:00
Author
Owner

@kradalby commented on GitHub (May 27, 2024):

Fix is up in https://github.com/juanfont/headscale/pull/1959, we checked the postgres error by string, and since you have yours in German, it did not match.

I would recommend you to change the postgres language to english, we will try to avoid this in the future, but since there is no uniform error checking for us in postgres, I will not rule out that this can happen again in the future, if there is a larger necessity for a check like this, then we might opt for not supporting other languages if necessary.

@kradalby commented on GitHub (May 27, 2024): Fix is up in https://github.com/juanfont/headscale/pull/1959, we checked the postgres error by string, and since you have yours in German, it did not match. I would recommend you to change the postgres language to english, we will try to avoid this in the future, but since there is no uniform error checking for us in postgres, I will not rule out that this can happen again in the future, if there is a larger necessity for a check like this, then we might opt for not supporting other languages if necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#716