Skip to content

docs(typelayer): tenants on one ClickHouse line must report the same zone spelling (UTC ≠ Etc/UTC) #717

Description

@EricAndrechek

Found while reviewing the type layer in draft PR #712 (branch chtypes-v2).

Problem. The server-zone check compares zone name strings. A tenant whose server reports Etc/UTC is refused by a process that opened its line as UTC, although both are the same zone. Inferred from reading the comparison; the refusal has not been reproduced.

Repro (to be confirmed). Run two ClickHouse servers, one with timezone set to UTC and one to Etc/UTC, register both as tenants in one process.

Expected: zones that resolve to the same offsets are accepted.

Activity

  1. EricAndrechek commented on Oct 1, 2026

    @EricAndrechek
    MemberAuthor

    Correction: comparing zone names is the safe behaviour, not a bug.

    This was measured on the 26.8.15.10 chtypes artifact: for a bare DateTime column, DEFAULT timezoneOf(ts) stores the zone spelling the library was opened with, verbatim. UTC stores "UTC" and Etc/UTC stores "Etc/UTC", and the same goes for US/Pacific vs America/Los_Angeles. A server presumably stores its own configured spelling (inferred).

    So if a tenant whose server reports Etc/UTC were served by a line opened as UTC, a timezoneOf-style DEFAULT would publish and insert "UTC" where the server stores "Etc/UTC". That is a silent wrong value. Refusing the tenant on a spelling mismatch avoids it.

    What is left is documentation: tenants served by one process on one ClickHouse line must report the same zone spelling, not just the same zone, so give servers one consistent spelling. Retitled to match. Per-call or per-schema zones are tracked upstream in chtypes, and would remove the constraint.

  2. changed the title [-]bug(typelayer): the zone check compares names, so a tenant reporting Etc/UTC is refused by a process opened as UTC[/-] [+]docs(typelayer): tenants on one ClickHouse line must report the same zone spelling (UTC ≠ Etc/UTC)[/+] on Oct 1, 2026
  3. EricAndrechek commented on Oct 4, 2026

    @EricAndrechek
    MemberAuthor

    Update from #712's move to chtypes 1.0: the per-line zone check this issue describes is gone. A process now has one image zone, taken from the first tenant actually served, and every other tenant's server zone is passed per call when it differs.

    How the spelling case looks now (inferred from internal/typelayer/zone.go, not reproduced):

    • A tenant reporting Etc/UTC in a process whose image zone is UTC is no longer refused whole.
    • Its name differs from the image zone's, so it counts as a different zone.
      • Its zone is passed per call. That is harmless, because literals and parsing come out the same.
      • The narrowed per-table rule refuses its tables that pair a zone-less DateTime column with a DEFAULT/MATERIALIZED/ALIAS/EPHEMERAL expression, although both names resolve to the same zone.

    Related: #726 (which tenant sets the image zone).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions