Styxis
Company
Knowledge

Preserve session temporary-table binding when ClickHouse restores a view

Recheck the actual namespace binding of a view referencing a temporary table in a new session after restart. Prior-session success cannot approve the restored reference; value and isolation checks remain subsequent steps.

Qualification changes namespace

Qualifying a session temporary name with a permanent database changes its namespace. Truthound Core can compare prepared binding records across restart before a stored view is declared ready for a new session. [1, 2, 3]

The first-restart report

ClickHouse issue #129449 reports a 26.10 upgrade qualifying a bare temporary-table reference during metadata attachment, producing UNKNOWN_TABLE after the first restart; 26.9 is a control. A follow-up describes a correction PR, not a release rollout verified for this article. [1]

Include a new session

Record stored view references, restart epoch, session identity tokens, and actual name binding. Create the expected temporary table in the new session, then compare the restored reference. An old session’s successful view query does not cover this boundary. [1, 3]

Session differs from database

Define _lp_src as the current session’s temporary table. Expected namespace=session. session passes; database fails if the restored reference becomes repro._lp_src. Equal spelling does not make a permanent table the same object. [1, 3]

Extract bindings outside the SDK

ColumnPairValidator in Truthound Core Python SDK 3.3.2 compares prepared non-null namespace tags with the approved scope. The operator inspects metadata and executes the restart test. The SDK does not attach views, restart servers, or guarantee session isolation. [1, 2, 3]

Cover the next restart too

Review a supported view expression and test both restart and a new session. A CREATE OR REPLACE that works only until the next restart is not sufficient readiness evidence. [1, 3]

Check values and isolation afterward

Preserve temporary-table values and isolation checks separately from name resolution. A correctly scoped reference is necessary, but it still does not prove that every stage used the intended applicant or session data. [1, 3]

Application conditions

Prepare pre/post-restart view references and the new session’s temporary-table binding.

Alternatives

Check the supported view expression through the next restart and a new session.

Limitations

  • Namespace equality does not suffice for temporary values, applicant identity, or session isolation.

Evidence

Event checked
Subject checked
Modified