Repository navigation
Fix the table name used by MaterializedPostgreSQL for the Relation message in multi-schema mode - #125952
Conversation
…essage `deleted_tables` and `waiting_list` of `MaterializedPostgreSQLConsumer` are keyed by the ClickHouse table name, which includes the PostgreSQL schema when `materialized_postgresql_schema_list` or `materialized_postgresql_tables_list_with_schema` is used. The `Insert`, `Update` and `Delete` messages already pass that name, but the `Relation` message passed the bare PostgreSQL relation name. So in the multi-schema modes a table removed with `DETACH TABLE ... PERMANENTLY` was not recognized as deleted when its `Relation` message was still in the replication stream: the consumer logged a misleading error that the storage does not exist and put the table into the skip list. Related: #110493 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [9a82518] Summary: ✅
AI ReviewSummary
Missing context / blind spots
Final VerdictStatus: ✅ Approve. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 12 s compile time in total, 7 of them have a recent master baseline. |
|
🕵 Merged the latest I did not add a test. The only effect of the fix is that a misleading A maintainer needs to decide: accept the red test gate as it is, or change the changelog category (for example to |
|
🕵 Merged the latest |
|
🕵 Merged the latest |
|
🕵 The only red check was |
|
🕵 Merged the latest |
|
🕵 None of the three red checks comes from this PR (it changes one line in
The branch already includes |
|
🕵 Merged the latest |
|
🕵 Merged the latest The only red check on 7413d91 was @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125952&sha=7413d91dbea5c81f14c8ce6c5bcd498e357c066c&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20parallel%29 and provide a fix in a separate PR. If the fix is already in progress, link it here. (These may be related: #127913 and #128090.) |
|
The fix is already in progress: #126995 (mine, open, mergeable, waiting for a review). This run hangs for the same reason as
The two other PRs:
|
|
The minimal change can go without new tests. |
…anularity_bytes` With a small randomized `index_granularity_bytes` (e.g. 4497), adaptive granularity gives the combined two-column table granules with half as many rows as the single-column tables, so its compressed blocks are smaller and compress worse, and the 5% size bound is exceeded. Pin `index_granularity_bytes` to the default in all three tables. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125952&sha=d0a72c3189ee40f5727ba0189b3f36597b852544&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20AsyncInsert%2C%20s3%20storage%2C%20parallel%29 PR: ClickHouse#125952 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #110493
MaterializedPostgreSQLConsumer::isSyncAllowedlooks a table up indeleted_tablesandwaiting_list, which are keyed by the ClickHouse table name. In the multi-schema modes (materialized_postgresql_schema_list, ormaterialized_postgresql_tables_list_with_schema) that name includes the PostgreSQL schema (schema.table). TheInsert,UpdateandDeletemessages already pass that name, but theRelationmessage passed the bare PostgreSQL relation name, so the lookup always missed in those modes.The visible consequence: after
DETACH TABLE ... PERMANENTLYin a multi-schema database, aRelationmessage for that table still in the replication stream was not recognized as belonging to a deleted table. The consumer logged a misleadingStorage for table ... does not exist, but is included in replication streamerror and put the table into the skip list (the entry is cleared again by a laterATTACH TABLE). Data was not affected, because the subsequentInsert/Update/Deletemessages use the correct key. The change was split out of #110493.No test is added: the only observable effect is a log message, and reproducing it requires the
Relationmessage to arrive after theDETACH TABLE ... PERMANENTLY, which cannot be arranged deterministically without timing assumptions. For this reason the change is categorized as an improvement rather than a bug fix, which would require a regression test.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed a misleading error
Storage for table ... does not exist, but is included in replication streamlogged by aMaterializedPostgreSQLdatabase withmaterialized_postgresql_schema_listormaterialized_postgresql_tables_list_with_schemaafterDETACH TABLE ... PERMANENTLY.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125952]
Version info
26.11.1.908-master(included in26.11and later)