mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 13:52:51 +00:00
# Which Problems Are Solved When starting Zitadel with Postgres version 18, setup fails with the following error: `level=error msg="migration failed" caller=".../cmd/setup/setup.go:373" code=0A000 detail= error="ERROR: partitioned tables cannot be unlogged (SQLSTATE 0A000)" hint= message="partitioned tables cannot be unlogged" name=34_add_cache_schema severity=ERROR` # How the Problems Are Solved - Modify setup step 34 to ensure compatibility with PostgreSQL 18 by changing the creation of the partitioned tables to`LOGGED` tables but keep the partitions `UNLOGGED`. - Added an additional setup step which alters the table persistence of the partitioned tables to `LOGGED`. # Additional Changes - Bumped Postgres compatibility to version 18 in docs. - Ensure default partitions for cache tables ## Additional Context - closes https://github.com/zitadel/zitadel/issues/10712 - backport to v4 - migration from PostgreSQL version 17 to 18 was verified using `pg_dumpall` and restoring the created backup file - and new setups using PostgreSQL version 18 directly --------- Co-authored-by: Copilot <[email protected]>
89 lines
2.2 KiB
YAML
89 lines
2.2 KiB
YAML
services:
|
|
|
|
devcontainer:
|
|
image: mcr.microsoft.com/devcontainers/typescript-node:22-bookworm
|
|
volumes:
|
|
- ../:/workspaces/zitadel:cached
|
|
command: sleep infinity
|
|
working_dir: /workspaces/zitadel
|
|
environment:
|
|
SHELL: /bin/bash
|
|
DEBIAN_FRONTEND: noninteractive
|
|
LANG: C.UTF-8
|
|
LC_ALL: C.UTF-8
|
|
COREPACK_ENABLE_DOWNLOAD_PROMPT: 0
|
|
DEVCONTAINER_DB_HOST: db
|
|
DEVCONTAINER_API_HOST: api
|
|
DEVCONTAINER_LOGIN_HOST: login
|
|
DEVCONTAINER_LOGIN_API_MOCK_HOST: login-api-mock
|
|
DEVCONTAINER_DB_API_INTEGRATION_HOST: db-api-integration
|
|
DEVCONTAINER_DB_FUNCTIONAL_UI_HOST: db-functional-ui
|
|
ports:
|
|
- "8080:8080"
|
|
- "3000:3000"
|
|
- "4200:4200"
|
|
|
|
db:
|
|
image: postgres:18
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ./.env.db
|
|
volumes:
|
|
- db-data-dev:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready", "-U", "postgres" ]
|
|
interval: "10s"
|
|
timeout: "30s"
|
|
retries: 5
|
|
start_period: "20s"
|
|
ports:
|
|
- 5432:5432
|
|
|
|
db-api-integration:
|
|
image: 'postgres:18'
|
|
env_file:
|
|
- ./.env.db
|
|
environment:
|
|
PGPORT: 5433
|
|
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c shared_buffers=1GB -c work_mem=16MB -c effective_io_concurrency=100 -c wal_level=minimal -c archive_mode=off -c max_wal_senders=0
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready", "-U", "postgres" ]
|
|
interval: '10s'
|
|
timeout: '30s'
|
|
retries: 5
|
|
start_period: '20s'
|
|
ports:
|
|
- 5433:5433
|
|
|
|
cache-api-integration:
|
|
image: 'redis:8'
|
|
ports:
|
|
- 6379:6379
|
|
|
|
db-functional-ui:
|
|
image: 'postgres:18'
|
|
env_file:
|
|
- ./.env.db
|
|
environment:
|
|
PGPORT: 5434
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready", "-U", "postgres" ]
|
|
interval: '10s'
|
|
timeout: '30s'
|
|
retries: 5
|
|
start_period: '20s'
|
|
ports:
|
|
- "5434:5434"
|
|
|
|
login-api-mock:
|
|
build:
|
|
context: ../apps/login/integration/api-mock
|
|
additional_contexts:
|
|
zitadel-protos: ../proto
|
|
ports:
|
|
- 22220:22220
|
|
- 22222:22222
|
|
|
|
volumes:
|
|
db-data-dev:
|