Commit Graph
3 Commits
Author SHA1 Message Date
SilvanandGitHub 839a2d3b5b Prevent failure in setup step 69 if cache.objects does not exist (#11673)
# Which Problems Are Solved

If the `cache.objects`-table does not exist setup failes with the
following error:

`ERROR:  relation "cache.objects" does not exist at character 44`

# How the Problems Are Solved

Changed statement to prevent immediately throw an error if the table is
missing.

# Additional Context

- reported in
https://discord.com/channels/927474939156643850/1473769282880934089
- backport to v4
2026-02-24 09:51:22 +00:00
SilvanandGitHub be6590c33c fix(setup): ensure step 69 runs without issues (#11503)
## Which problems are solved

https://github.com/zitadel/zitadel/pull/11484 introduced a regression
that causes the setup process to fail on existing Zitadel deployments.
This prevents users from upgrading to recent versions without
encountering setup failures.

## How the problems are solved

Setup step 69 has been corrected to properly handle existing deployment
configurations and prevent setup failures during initialization and
upgrades.

## Additional Context

introduced by
[7a41fe968b](https://github.com/zitadel/zitadel/commit/7a41fe968b9fcb69b378336740b74e5448c1ff81)

### Testing

- [x] Verified setup succeeds on fresh deployments
- [x] Verified setup succeeds on existing deployments
- [x] Verified migration from PostgreSQL 17 to 18 after running setup of
this version
2026-02-04 10:55:46 +00:00
7a41fe968b fix(setup): ensure PostgreSQL 18 compatibility (#11484)
# 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 <175728472+Copilot@users.noreply.github.com>
2026-02-03 16:23:24 +00:00