Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaterializedPostgreSQL error in materialized_postgresql_tables_list #28901

Closed
RazieI opened this issue Sep 11, 2021 · 0 comments · Fixed by #28933
Closed

MaterializedPostgreSQL error in materialized_postgresql_tables_list #28901

RazieI opened this issue Sep 11, 2021 · 0 comments · Fixed by #28933

Comments

@RazieI
Copy link

RazieI commented Sep 11, 2021

Describe the issue

Passing table with schema name in materialized_postgresql_tables_list will result in error on table copy step.


How to reproduce

Postgresql:

Create sample table with query:

create schema test;

CREATE TABLE test.table (
id int4 NOT NULL,
"data" text NULL,
CONSTRAINT table_pk PRIMARY KEY (id)
);

Clickhouse:

CREATE DATABASE postgresql_test_replica
ENGINE = MaterializedPostgreSQL('<some_pg_host>5432', '<name_of_database>', '', 'password')
SETTINGS materialized_postgresql_allow_automatic_update = 1,
materialized_postgresql_tables_list = 'test.table';

After running this query this error appears in clickhouse-server.err.log:
LINE 1: COPY (SELECT * FROM "test.table") TO STDOUT

Reason is double quotes around table name and table schema.


This steps will work with version: 21.8.4.51
Will fail with version: 21.9.2.17

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

Successfully merging a pull request may close this issue.

2 participants