Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/elixir_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

services:
db:
image: postgres:17
image: postgres:18-trixie
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- fix: allow using different PostgreSQL port than default when using socket_dir connection (#4979 - @jaypark0006)
- perf: use anti join for short-circuit evaluation when getting non streamed drives (#4990 - @swiffer)
- feat: Add ulimit cap to prevent memory bloat in some misconfigured versions of Docker/containerd Hosts (e.g. on Debian 13) (#5025 - @JakobLichterfeld)
- feat: officially support PostgreSQL 18 (#4890 - @swiffer)

#### Build, CI, internal

Expand Down Expand Up @@ -54,6 +55,7 @@
- docs: add domain prefix to Home Assistant default_entity_id (#5014 - @gym22)
- docs: add star history (#5024 - @JakobLichterfeld)
- docs: bump Traefik to v3.5 and enable http3 in advanced guide (#5023 - @swiffer)
- docs: add docs for volume mount change with PostgreSQL 18 (#4890 - @swiffer)

## [2.1.1] - 2025-08-16

Expand Down
5 changes: 3 additions & 2 deletions lib/teslamate/database_check.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ defmodule TeslaMate.DatabaseCheck do

@version_requirements %{
1600 => %{min_version: "16.7", min_version_num: 160_007},
1700 => %{min_version: "17.3", min_version_num: 170_003}
1700 => %{min_version: "17.3", min_version_num: 170_003},
1800 => %{min_version: "18.0", min_version_num: 180_000}
}

def check_postgres_version do
Expand Down Expand Up @@ -49,7 +50,7 @@ defmodule TeslaMate.DatabaseCheck do
version_num: version_num
}) do
cond do
major > 1700 ->
major > 1800 ->
IO.puts(
"PostgreSQL version #{version} is not officially tested or supported yet. Use at your own risk."
)
Expand Down
4 changes: 2 additions & 2 deletions website/docs/advanced_guides/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ services:
- all

database:
image: postgres:17
image: postgres:18-trixie
restart: always
environment:
- POSTGRES_USER=${TM_DB_USER}
- POSTGRES_PASSWORD=${TM_DB_PASS}
- POSTGRES_DB=${TM_DB_NAME}
volumes:
- teslamate-db:/var/lib/postgresql/data
- teslamate-db:/var/lib/postgresql

grafana:
image: teslamate/grafana:latest
Expand Down
4 changes: 2 additions & 2 deletions website/docs/advanced_guides/traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ services:
- ALL

database:
image: postgres:17
image: postgres:18-trixie
restart: always
environment:
- POSTGRES_USER=${TM_DB_USER}
- POSTGRES_PASSWORD=${TM_DB_PASS}
- POSTGRES_DB=${TM_DB_NAME}
volumes:
- teslamate-db:/var/lib/postgresql/data
- teslamate-db:/var/lib/postgresql

grafana:
image: teslamate/grafana:latest
Expand Down
2 changes: 1 addition & 1 deletion website/docs/development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ To quickly identify performance bottlenecks we encourage all contributors to ena
```yml
services:
database:
image: postgres:17
image: postgres:18-trixie
...
command: postgres -c shared_preload_libraries=pg_stat_statements
...
Expand Down
4 changes: 2 additions & 2 deletions website/docs/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ Alternatively, you can use a reverse proxy (such as Traefik, Apache2 or Caddy) w
- all

database:
image: postgres:17-trixie
image: postgres:18-trixie
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=password #insert your secure database password!
- POSTGRES_DB=teslamate
volumes:
- teslamate-db:/var/lib/postgresql/data
- teslamate-db:/var/lib/postgresql

grafana:
image: teslamate/grafana:latest
Expand Down
4 changes: 2 additions & 2 deletions website/docs/installation/unsupported/debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Click on the following items to view detailed installation steps.
Note that in very recent distributions, you might have the required versions already packaged. However, the contents or naming of the Debian/Ubuntu packages might slightly differ than the ones from upstream, so you might need to install extra packages or do other tweaks.

<details>
<summary>Postgres (v17.3+)</summary>
<summary>Postgres (v16.7+, v17.3+ or v18.0+)</summary>

Either upstream:

```bash
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt-get update
sudo apt-get install -y postgresql-17 postgresql-client-17
sudo apt-get install -y postgresql-18 postgresql-client-18
```

Source: [postgresql.org/download](https://www.postgresql.org/download/)
Expand Down
6 changes: 3 additions & 3 deletions website/docs/installation/unsupported/freebsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ pkg install elixir
</details>

<details>
<summary>Postgres (v17.3+)</summary>
<summary>Postgres (v16.7+, v17.3+ or v18.0+)</summary>

```bash
pkg install postgresql17-server
pkg install postgresql17-contrib
pkg install postgresql18-server
pkg install postgresql18-contrib
echo postgres_enable="yes" >> /etc/rc.conf
```

Expand Down
7 changes: 5 additions & 2 deletions website/docs/maintenance/upgrading_postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ sidebar_label: Upgrading PostgreSQL
docker volume rm "$(basename "$PWD")_teslamate-db"
```

4. Change the postgres version in docker-compose.yml and start the container
4. Change the postgres version and ensure your volume mount is [configured correctly](https://hub.docker.com/_/postgres#pgdata) in docker-compose.yml and start the container

```yml {2}
database:
image: postgres:xx-trixie
image: postgres:18-trixie
...
volumes:
- teslamate-db:/var/lib/postgresql
```
```bash
Expand Down
Loading