flink-cdc icon indicating copy to clipboard operation
flink-cdc copied to clipboard

[Bug] About PostgresSql snapshot sql

Open linzhicong1996 opened this issue 2 years ago • 4 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Flink version

1.14.6

Flink CDC version

2.4.1

Database and its version

PostgreSQL 13.2

Minimal reproduce step

  In the version of flink-connector-postgres-cdc  2.4.1, snapshot SQL is generated during a full snapshot and is split according to the command of key,When running POSTGRESQL SQL, the column will be case-sensitive. But in fact, when the SQL is generated, double quotation marks are not added to this column. Therefore POSTGRESQL converts this column to lowercase, and lead to POSTGRESQL cannot identify this column, resulting in an error. 638901E5-7EC3-41D2-88F6-8AA4D12D54FE

package com.ververica.cdc.connectors.postgres.source.utils;

6027352F-2643-4D3B-9D75-4CE712CBAC27 9966F5AB-0E48-4600-8BC6-FDF6480E7297

What did you expect to see?

“key”

What did you see instead?

key

Anything else?

No response

Are you willing to submit a PR?

  • [X] I'm willing to submit a PR!

linzhicong1996 avatar Aug 08 '23 12:08 linzhicong1996

I modified the relevant code and the program is already working, but because I am not familiar with the whole program, I don't know if it will raise the related GUG

0516B4A0-7C1B-4258-A95F-E1BE08DAF2A4

linzhicong1996 avatar Aug 09 '23 05:08 linzhicong1996

@linzhicong1996 Assign this to you. Please ping me after you raise the PR. Thanks.

ruanhang1993 avatar Aug 14 '23 07:08 ruanhang1993

@ruanhang1993 Code has been submitted.

[postgres] PostgresSql snapshot sql #2389

linzhicong1996 avatar Aug 14 '23 13:08 linzhicong1996

I don't understand why PostgresDialect#isDataCollectionIdCaseSensitive always returns true, meaning that is database always use case-sensitive strategy, but this PR will change it to no case-insensitive?

What kind of strategy is actually needed? @ruanhang1993 , CC, WDYT?

loserwang1024 avatar Feb 05 '24 10:02 loserwang1024

@linzhicong1996 , this issue has been migrated to https://issues.apache.org/jira/browse/FLINK-34805, Please modify your PR tittle with [FLINK-34805][xxx] xxxx as https://nightlies.apache.org/flink/flink-cdc-docs-master/docs/developer-guide/contribute-to-flink-cdc/#contributing shows

loserwang1024 avatar Mar 21 '24 03:03 loserwang1024

Closing this issue as it has been migrated to Apache Jira.

PatrickRen avatar Apr 09 '24 06:04 PatrickRen