Yizhou-Yang opened a new issue, #8653:
URL: https://github.com/apache/inlong/issues/8653
### What happened
We have client reports that pg-pg multiple table scenerios would fail on
certain versions of postgres cdc (namely cdwpg 2.0), since .
private static final String QUERY_PRIMARY_KEY_SQL = "SELECT\n" +
"\tstring_agg (DISTINCT t3.attname, ',') AS " +
PRIMARY_KEY_COLUMN + ",\n" +
" \tt4.tablename AS tableName\n" +
"FROM\n" +
"\tpg_constraint t1\n" +
"INNER JOIN pg_class t2 ON t1.conrelid = t2.oid\n" +
"INNER JOIN pg_attribute t3 ON t3.attrelid = t2.oid\n" +
"AND array_position (t1.conkey, t3.attnum) is not null\n" +
"INNER JOIN pg_tables t4 on t4.tablename = t2.relname\n" +
"INNER JOIN pg_index t5 ON t5.indrelid = t2.oid\n" +
"AND t3.attnum = ANY (t5.indkey)\n" +
"LEFT JOIN pg_description t6 on t6.objoid = t3.attrelid\n" +
"and t6.objsubid = t3.attnum\n" +
"WHERE\n" +
"\tt1.contype = 'p'\n" +
"AND length (t3.attname) > 0\n" +
"AND t2.oid = ?::regclass\n" +
"group by\n" +
"\tt4.tablename";
<img width="1463" alt="企业微信截图_a78c27f6-f7d2-4158-a46c-dc5d524b9bbd"
src="https://github.com/apache/inlong/assets/32808678/52553cee-8848-4a78-8032-5527cee1c6cf">
### What you expected to happen
the query sql should be compatible with most versions of postgres cdc.
### How to reproduce
the problem is specific to some version of postgres. My edited sql should be
strictly MORE compatible than the old one. It is tested in the production
environment by the client via a hotfix (many hotfixes, actually). So it should
not product any errors.
### Environment
_No response_
### InLong version
master
### InLong Component
InLong Sort
### Are you willing to submit PR?
- [X] Yes, I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]