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

fix(frontend): upgrade pg version to 9.5.0 #11179

Merged
merged 2 commits into from
Jul 25, 2023
Merged

fix(frontend): upgrade pg version to 9.5.0 #11179

merged 2 commits into from
Jul 25, 2023

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Jul 24, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

close #10099 fix #11178 related #10021

I've manually tested Trino connector. (Only very basic like integration_tests/presto-trino/README.md)

P.S. Trino's queries:

`show tables;`
2023-07-24T23:30:16.267882+02:00  INFO risingwave_frontend::scheduler::snapshot: unpin snapshot with RPC min_epoch=4784063347425280
2023-07-24T23:30:18.642538+02:00  INFO pgwire::pg_server: New connection: 127.0.0.1:58529
2023-07-24T23:30:18.656581+02:00  INFO pgwire_query_log: mode=(extended query parse) session=8 status=ok time=0ms sql=SET extra_float_digits = 3
2023-07-24T23:30:18.65723+02:00  INFO risingwave_common::session_config: set config key=extra_float_digits val=["3"]
2023-07-24T23:30:18.657323+02:00  INFO pgwire_query_log: mode=(extended query execute) session=8 status=ok time=0ms sql=SET extra_float_digits = 3
2023-07-24T23:30:18.658087+02:00  INFO pgwire_query_log: mode=(extended query parse) session=8 status=ok time=0ms sql=SET application_name = 'PostgreSQL JDBC Driver'
2023-07-24T23:30:18.65832+02:00  INFO risingwave_common::session_config: set config key=application_name val=["PostgreSQL JDBC Driver"]
2023-07-24T23:30:18.658387+02:00  INFO pgwire_query_log: mode=(extended query execute) session=8 status=ok time=0ms sql=SET application_name = 'PostgreSQL JDBC Driver'
2023-07-24T23:30:18.669405+02:00  INFO pgwire_query_log: mode=(extended query parse) session=8 status=ok time=8ms sql=SELECT nspname AS TABLE_SCHEM, NULL AS TABLE_CATALOG FROM pg_catalog.pg_namespace  WHERE nspname <> 'pg_toast' AND (nspname !~ '^pg_temp_'  OR nspname = (pg_catalog.current_schemas(true))[1]) AND (nspname !~ '^pg_toast_temp_'  OR nspname = replace((pg_catalog.current_schemas(true))[1], 'pg_temp_', 'pg_toast_temp_'))  ORDER BY TABLE_SCHEM
2023-07-24T23:30:18.676955+02:00  INFO pgwire_query_log: mode=(extended query execute) session=8 status=ok time=5ms sql=SELECT nspname AS TABLE_SCHEM, NULL AS TABLE_CATALOG FROM pg_catalog.pg_namespace WHERE nspname <> 'pg_toast' AND (nspname !~ '^pg_temp_' OR nspname = (pg_catalog.current_schemas(true))[1]) AND (nspname !~ '^pg_toast_temp_' OR nspname = replace((pg_catalog.current_schemas(true))[1], 'pg_temp_', 'pg_toast_temp_')) ORDER BY TABLE_SCHEM, params = Some([])
2023-07-24T23:30:18.677003+02:00 DEBUG local_execute{query_id="02f54b00-50d2-43ac-ba6a-1aa154d89d9d" epoch=BatchQueryEpoch { epoch: Some(Current(4784063609569280)) }}: risingwave_frontend::scheduler::local: Starting to run query self.query.query_id=QueryId:02f54b00-50d2-43ac-ba6a-1aa154d89d9d self.sql=""
2023-07-24T23:30:18.677042+02:00 DEBUG local_execute{query_id="02f54b00-50d2-43ac-ba6a-1aa154d89d9d" epoch=BatchQueryEpoch { epoch: Some(Current(4784063609569280)) }}: risingwave_frontend::scheduler::local: Local execution mode converts a plan with two stages
2023-07-24T23:30:18.733302+02:00  INFO pgwire_query_log: mode=(extended query parse) session=8 status=ok time=2ms sql=SELECT nspname AS TABLE_SCHEM, NULL AS TABLE_CATALOG FROM pg_catalog.pg_namespace  WHERE nspname <> 'pg_toast' AND (nspname !~ '^pg_temp_'  OR nspname = (pg_catalog.current_schemas(true))[1]) AND (nspname !~ '^pg_toast_temp_'  OR nspname = replace((pg_catalog.current_schemas(true))[1], 'pg_temp_', 'pg_toast_temp_'))  ORDER BY TABLE_SCHEM
2023-07-24T23:30:18.748768+02:00  INFO pgwire_query_log: mode=(extended query execute) session=8 status=ok time=14ms sql=SELECT nspname AS TABLE_SCHEM, NULL AS TABLE_CATALOG FROM pg_catalog.pg_namespace WHERE nspname <> 'pg_toast' AND (nspname !~ '^pg_temp_' OR nspname = (pg_catalog.current_schemas(true))[1]) AND (nspname !~ '^pg_toast_temp_' OR nspname = replace((pg_catalog.current_schemas(true))[1], 'pg_temp_', 'pg_toast_temp_')) ORDER BY TABLE_SCHEM, params = Some([])
2023-07-24T23:30:18.748843+02:00 DEBUG local_execute{query_id="ea61be72-3760-4e16-a9cc-1a98dade7684" epoch=BatchQueryEpoch { epoch: Some(Current(4784063609569280)) }}: risingwave_frontend::scheduler::local: Starting to run query self.query.query_id=QueryId:ea61be72-3760-4e16-a9cc-1a98dade7684 self.sql=""
2023-07-24T23:30:18.74889+02:00 DEBUG local_execute{query_id="ea61be72-3760-4e16-a9cc-1a98dade7684" epoch=BatchQueryEpoch { epoch: Some(Current(4784063609569280)) }}: risingwave_frontend::scheduler::local: Local execution mode converts a plan with two stages
2023-07-24T23:30:18.75399+02:00  INFO pgwire_query_log: mode=(extended query parse) session=8 status=ok time=2ms sql=SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME,  CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema'  WHEN true THEN CASE  WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind   WHEN 'r' THEN 'SYSTEM TABLE'   WHEN 'v' THEN 'SYSTEM VIEW'   WHEN 'i' THEN 'SYSTEM INDEX'   ELSE NULL   END  WHEN n.nspname = 'pg_toast' THEN CASE c.relkind   WHEN 'r' THEN 'SYSTEM TOAST TABLE'   WHEN 'i' THEN 'SYSTEM TOAST INDEX'   ELSE NULL   END  ELSE CASE c.relkind   WHEN 'r' THEN 'TEMPORARY TABLE'   WHEN 'p' THEN 'TEMPORARY TABLE'   WHEN 'i' THEN 'TEMPORARY INDEX'   WHEN 'S' THEN 'TEMPORARY SEQUENCE'   WHEN 'v' THEN 'TEMPORARY VIEW'   ELSE NULL   END  END  WHEN false THEN CASE c.relkind  WHEN 'r' THEN 'TABLE'  WHEN 'p' THEN 'PARTITIONED TABLE'  WHEN 'i' THEN 'INDEX'  WHEN 'P' then 'PARTITIONED INDEX'  WHEN 'S' THEN 'SEQUENCE'  WHEN 'v' THEN 'VIEW'  WHEN 'c' THEN 'TYPE'  WHEN 'f' THEN 'FOREIGN TABLE'  WHEN 'm' THEN 'MATERIALIZED VIEW'  ELSE NULL  END  ELSE NULL  END  AS TABLE_TYPE, d.description AS REMARKS,  '' as TYPE_CAT, '' as TYPE_SCHEM, '' as TYPE_NAME, '' AS SELF_REFERENCING_COL_NAME, '' AS REF_GENERATION  FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c  LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid AND d.objsubid = 0  and d.classoid = 'pg_class'::regclass)  WHERE c.relnamespace = n.oid  AND n.nspname LIKE 'public' AND (false  OR ( c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'p' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'm' )  OR ( c.relkind = 'f' ) )  ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME
2023-07-24T23:30:18.767403+02:00  INFO pgwire_query_log: mode=(extended query execute) session=8 status=ok time=12ms sql=SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema' WHEN true THEN CASE WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TABLE' WHEN 'v' THEN 'SYSTEM VIEW' WHEN 'i' THEN 'SYSTEM INDEX' ELSE NULL END WHEN n.nspname = 'pg_toast' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TOAST TABLE' WHEN 'i' THEN 'SYSTEM TOAST INDEX' ELSE NULL END ELSE CASE c.relkind WHEN 'r' THEN 'TEMPORARY TABLE' WHEN 'p' THEN 'TEMPORARY TABLE' WHEN 'i' THEN 'TEMPORARY INDEX' WHEN 'S' THEN 'TEMPORARY SEQUENCE' WHEN 'v' THEN 'TEMPORARY VIEW' ELSE NULL END END WHEN false THEN CASE c.relkind WHEN 'r' THEN 'TABLE' WHEN 'p' THEN 'PARTITIONED TABLE' WHEN 'i' THEN 'INDEX' WHEN 'P' THEN 'PARTITIONED INDEX' WHEN 'S' THEN 'SEQUENCE' WHEN 'v' THEN 'VIEW' WHEN 'c' THEN 'TYPE' WHEN 'f' THEN 'FOREIGN TABLE' WHEN 'm' THEN 'MATERIALIZED VIEW' ELSE NULL END ELSE NULL END AS TABLE_TYPE, d.description AS REMARKS, '' AS TYPE_CAT, '' AS TYPE_SCHEM, '' AS TYPE_NAME, '' AS SELF_REFERENCING_COL_NAME, '' AS REF_GENERATION FROM pg_catalog.pg_namespace AS n, pg_catalog.pg_class AS c LEFT JOIN pg_catalog.pg_description AS d ON (c.oid = d.objoid AND d.objsubid = 0 AND d.classoid = CAST('pg_class' AS REGCLASS)) WHERE c.relnamespace = n.oid AND n.nspname LIKE 'public' AND (false OR (c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema') OR (c.relkind = 'p' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema') OR (c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema') OR (c.relkind = 'm') OR (c.relkind = 'f')) ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME, params = Some([])
2023-07-24T23:30:18.767451+02:00 DEBUG local_execute{query_id="4e2c90dd-0175-4c0c-a87b-35c406eed366" epoch=BatchQueryEpoch { epoch: Some(Current(4784063609569280)) }}: risingwave_frontend::scheduler::local: Starting to run query self.query.query_id=QueryId:4e2c90dd-0175-4c0c-a87b-35c406eed366 self.sql=""
2023-07-24T23:30:18.767567+02:00 DEBUG local_execute{query_id="4e2c90dd-0175-4c0c-a87b-35c406eed366" epoch=BatchQueryEpoch { epoch: Some(Current(4784063609569280)) }}: risingwave_frontend::scheduler::local: Local execution mode converts a plan with two stages
2023-07-24T23:30:26.267378+02:00  INFO risingwave_frontend::scheduler::snapshot: unpin snapshot with RPC min_epoch=4784064002850816
`select * from test_table;` (just a simple row_number() OVER)
2023-07-24T23:27:26.167333+02:00  INFO pgwire::pg_server: New connection: 127.0.0.1:64429
2023-07-24T23:27:26.193281+02:00  INFO pgwire_query_log: mode=(extended query parse) session=5 status=ok time=0ms sql=SET extra_float_digits = 3
2023-07-24T23:27:26.193513+02:00  INFO risingwave_common::session_config: set config key=extra_float_digits val=["3"]
2023-07-24T23:27:26.19359+02:00  INFO pgwire_query_log: mode=(extended query execute) session=5 status=ok time=0ms sql=SET extra_float_digits = 3
2023-07-24T23:27:26.194351+02:00  INFO pgwire_query_log: mode=(extended query parse) session=5 status=ok time=0ms sql=SET application_name = 'PostgreSQL JDBC Driver'
2023-07-24T23:27:26.194515+02:00  INFO risingwave_common::session_config: set config key=application_name val=["PostgreSQL JDBC Driver"]
2023-07-24T23:27:26.194564+02:00  INFO pgwire_query_log: mode=(extended query execute) session=5 status=ok time=0ms sql=SET application_name = 'PostgreSQL JDBC Driver'
2023-07-24T23:27:26.197171+02:00  INFO pgwire_query_log: mode=(extended query parse) session=5 status=ok time=1ms sql=SELECT nspname AS TABLE_SCHEM, NULL AS TABLE_CATALOG FROM pg_catalog.pg_namespace  WHERE nspname <> 'pg_toast' AND (nspname !~ '^pg_temp_'  OR nspname = (pg_catalog.current_schemas(true))[1]) AND (nspname !~ '^pg_toast_temp_'  OR nspname = replace((pg_catalog.current_schemas(true))[1], 'pg_temp_', 'pg_toast_temp_'))  ORDER BY TABLE_SCHEM
2023-07-24T23:27:26.201259+02:00  INFO pgwire_query_log: mode=(extended query execute) session=5 status=ok time=3ms sql=SELECT nspname AS TABLE_SCHEM, NULL AS TABLE_CATALOG FROM pg_catalog.pg_namespace WHERE nspname <> 'pg_toast' AND (nspname !~ '^pg_temp_' OR nspname = (pg_catalog.current_schemas(true))[1]) AND (nspname !~ '^pg_toast_temp_' OR nspname = replace((pg_catalog.current_schemas(true))[1], 'pg_temp_', 'pg_toast_temp_')) ORDER BY TABLE_SCHEM, params = Some([])
2023-07-24T23:27:26.201374+02:00 DEBUG local_execute{query_id="13cb93b4-e26c-4059-a762-c5b4a09486fd" epoch=BatchQueryEpoch { epoch: Some(Current(4784052270071808)) }}: risingwave_frontend::scheduler::local: Starting to run query self.query.query_id=QueryId:13cb93b4-e26c-4059-a762-c5b4a09486fd self.sql=""
2023-07-24T23:27:26.20142+02:00 DEBUG local_execute{query_id="13cb93b4-e26c-4059-a762-c5b4a09486fd" epoch=BatchQueryEpoch { epoch: Some(Current(4784052270071808)) }}: risingwave_frontend::scheduler::local: Local execution mode converts a plan with two stages
2023-07-24T23:27:26.207917+02:00  INFO pgwire_query_log: mode=(extended query parse) session=5 status=ok time=2ms sql=SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME,  CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema'  WHEN true THEN CASE  WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind   WHEN 'r' THEN 'SYSTEM TABLE'   WHEN 'v' THEN 'SYSTEM VIEW'   WHEN 'i' THEN 'SYSTEM INDEX'   ELSE NULL   END  WHEN n.nspname = 'pg_toast' THEN CASE c.relkind   WHEN 'r' THEN 'SYSTEM TOAST TABLE'   WHEN 'i' THEN 'SYSTEM TOAST INDEX'   ELSE NULL   END  ELSE CASE c.relkind   WHEN 'r' THEN 'TEMPORARY TABLE'   WHEN 'p' THEN 'TEMPORARY TABLE'   WHEN 'i' THEN 'TEMPORARY INDEX'   WHEN 'S' THEN 'TEMPORARY SEQUENCE'   WHEN 'v' THEN 'TEMPORARY VIEW'   ELSE NULL   END  END  WHEN false THEN CASE c.relkind  WHEN 'r' THEN 'TABLE'  WHEN 'p' THEN 'PARTITIONED TABLE'  WHEN 'i' THEN 'INDEX'  WHEN 'P' then 'PARTITIONED INDEX'  WHEN 'S' THEN 'SEQUENCE'  WHEN 'v' THEN 'VIEW'  WHEN 'c' THEN 'TYPE'  WHEN 'f' THEN 'FOREIGN TABLE'  WHEN 'm' THEN 'MATERIALIZED VIEW'  ELSE NULL  END  ELSE NULL  END  AS TABLE_TYPE, d.description AS REMARKS,  '' as TYPE_CAT, '' as TYPE_SCHEM, '' as TYPE_NAME, '' AS SELF_REFERENCING_COL_NAME, '' AS REF_GENERATION  FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c  LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid AND d.objsubid = 0  and d.classoid = 'pg_class'::regclass)  WHERE c.relnamespace = n.oid  AND n.nspname LIKE 'public' AND (false  OR ( c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'p' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'm' )  OR ( c.relkind = 'f' ) )  ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME
2023-07-24T23:27:26.226095+02:00  INFO pgwire_query_log: mode=(extended query execute) session=5 status=ok time=17ms sql=SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema' WHEN true THEN CASE WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TABLE' WHEN 'v' THEN 'SYSTEM VIEW' WHEN 'i' THEN 'SYSTEM INDEX' ELSE NULL END WHEN n.nspname = 'pg_toast' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TOAST TABLE' WHEN 'i' THEN 'SYSTEM TOAST INDEX' ELSE NULL END ELSE CASE c.relkind WHEN 'r' THEN 'TEMPORARY TABLE' WHEN 'p' THEN 'TEMPORARY TABLE' WHEN 'i' THEN 'TEMPORARY INDEX' WHEN 'S' THEN 'TEMPORARY SEQUENCE' WHEN 'v' THEN 'TEMPORARY VIEW' ELSE NULL END END WHEN false THEN CASE c.relkind WHEN 'r' THEN 'TABLE' WHEN 'p' THEN 'PARTITIONED TABLE' WHEN 'i' THEN 'INDEX' WHEN 'P' THEN 'PARTITIONED INDEX' WHEN 'S' THEN 'SEQUENCE' WHEN 'v' THEN 'VIEW' WHEN 'c' THEN 'TYPE' WHEN 'f' THEN 'FOREIGN TABLE' WHEN 'm' THEN 'MATERIALIZED VIEW' ELSE NULL END ELSE NULL END AS TABLE_TYPE, d.description AS REMARKS, '' AS TYPE_CAT, '' AS TYPE_SCHEM, '' AS TYPE_NAME, '' AS SELF_REFERENCING_COL_NAME, '' AS REF_GENERATION FROM pg_catalog.pg_namespace AS n, pg_catalog.pg_class AS c LEFT JOIN pg_catalog.pg_description AS d ON (c.oid = d.objoid AND d.objsubid = 0 AND d.classoid = CAST('pg_class' AS REGCLASS)) WHERE c.relnamespace = n.oid AND n.nspname LIKE 'public' AND (false OR (c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema') OR (c.relkind = 'p' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema') OR (c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema') OR (c.relkind = 'm') OR (c.relkind = 'f')) ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME, params = Some([])
2023-07-24T23:27:26.226132+02:00 DEBUG local_execute{query_id="6eb3ba2d-7bdc-49dd-848d-73d7d334464a" epoch=BatchQueryEpoch { epoch: Some(Current(4784052270071808)) }}: risingwave_frontend::scheduler::local: Starting to run query self.query.query_id=QueryId:6eb3ba2d-7bdc-49dd-848d-73d7d334464a self.sql=""
2023-07-24T23:27:26.226272+02:00 DEBUG local_execute{query_id="6eb3ba2d-7bdc-49dd-848d-73d7d334464a" epoch=BatchQueryEpoch { epoch: Some(Current(4784052270071808)) }}: risingwave_frontend::scheduler::local: Local execution mode converts a plan with two stages
2023-07-24T23:27:26.236222+02:00  INFO pgwire_query_log: mode=(extended query parse) session=5 status=ok time=2ms sql=SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME,  CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema'  WHEN true THEN CASE  WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind   WHEN 'r' THEN 'SYSTEM TABLE'   WHEN 'v' THEN 'SYSTEM VIEW'   WHEN 'i' THEN 'SYSTEM INDEX'   ELSE NULL   END  WHEN n.nspname = 'pg_toast' THEN CASE c.relkind   WHEN 'r' THEN 'SYSTEM TOAST TABLE'   WHEN 'i' THEN 'SYSTEM TOAST INDEX'   ELSE NULL   END  ELSE CASE c.relkind   WHEN 'r' THEN 'TEMPORARY TABLE'   WHEN 'p' THEN 'TEMPORARY TABLE'   WHEN 'i' THEN 'TEMPORARY INDEX'   WHEN 'S' THEN 'TEMPORARY SEQUENCE'   WHEN 'v' THEN 'TEMPORARY VIEW'   ELSE NULL   END  END  WHEN false THEN CASE c.relkind  WHEN 'r' THEN 'TABLE'  WHEN 'p' THEN 'PARTITIONED TABLE'  WHEN 'i' THEN 'INDEX'  WHEN 'P' then 'PARTITIONED INDEX'  WHEN 'S' THEN 'SEQUENCE'  WHEN 'v' THEN 'VIEW'  WHEN 'c' THEN 'TYPE'  WHEN 'f' THEN 'FOREIGN TABLE'  WHEN 'm' THEN 'MATERIALIZED VIEW'  ELSE NULL  END  ELSE NULL  END  AS TABLE_TYPE, d.description AS REMARKS,  '' as TYPE_CAT, '' as TYPE_SCHEM, '' as TYPE_NAME, '' AS SELF_REFERENCING_COL_NAME, '' AS REF_GENERATION  FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c  LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid AND d.objsubid = 0  and d.classoid = 'pg_class'::regclass)  WHERE c.relnamespace = n.oid  AND n.nspname LIKE 'public' AND c.relname LIKE 'test\_table' AND (false  OR ( c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'p' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' )  OR ( c.relkind = 'm' )  OR ( c.relkind = 'f' ) )  ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME
2023-07-24T23:27:26.255022+02:00  INFO pgwire_query_log: mode=(extended query execute) session=5 status=ok time=18ms sql=SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema' WHEN true THEN CASE WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TABLE' WHEN 'v' THEN 'SYSTEM VIEW' WHEN 'i' THEN 'SYSTEM INDEX' ELSE NULL END WHEN n.nspname = 'pg_toast' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TOAST TABLE' WHEN 'i' THEN 'SYSTEM TOAST INDEX' ELSE NULL END ELSE CASE c.relkind WHEN 'r' THEN 'TEMPORARY TABLE' WHEN 'p' THEN 'TEMPORARY TABLE' WHEN 'i' THEN 'TEMPORARY INDEX' WHEN 'S' THEN 'TEMPORARY SEQUENCE' WHEN 'v' THEN 'TEMPORARY VIEW' ELSE NULL END END WHEN false THEN CASE c.relkind WHEN 'r' THEN 'TABLE' WHEN 'p' THEN 'PARTITIONED TABLE' WHEN 'i' THEN 'INDEX' WHEN 'P' THEN 'PARTITIONED INDEX' WHEN 'S' THEN 'SEQUENCE' WHEN 'v' THEN 'VIEW' WHEN 'c' THEN 'TYPE' WHEN 'f' THEN 'FOREIGN TABLE' WHEN 'm' THEN 'MATERIALIZED VIEW' ELSE NULL END ELSE NULL END AS TABLE_TYPE, d.description AS REMARKS, '' AS TYPE_CAT, '' AS TYPE_SCHEM, '' AS TYPE_NAME, '' AS SELF_REFERENCING_COL_NAME, '' AS REF_GENERATION FROM pg_catalog.pg_namespace AS n, pg_catalog.pg_class AS c LEFT JOIN pg_catalog.pg_description AS d ON (c.oid = d.objoid AND d.objsubid = 0 AND d.classoid = CAST('pg_class' AS REGCLASS)) WHERE c.relnamespace = n.oid AND n.nspname LIKE 'public' AND c.relname LIKE 'test\_table' AND (false OR (c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema') OR (c.relkind = 'p' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema') OR (c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema') OR (c.relkind = 'm') OR (c.relkind = 'f')) ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME, params = Some([])
2023-07-24T23:27:26.25505+02:00 DEBUG local_execute{query_id="3db5e548-d16c-4c89-bb03-50a4a2684dd4" epoch=BatchQueryEpoch { epoch: Some(Current(4784052270071808)) }}: risingwave_frontend::scheduler::local: Starting to run query self.query.query_id=QueryId:3db5e548-d16c-4c89-bb03-50a4a2684dd4 self.sql=""
2023-07-24T23:27:26.255194+02:00  INFO risingwave_frontend::scheduler::snapshot: unpin snapshot with RPC min_epoch=4784052204470272
2023-07-24T23:27:26.255206+02:00 DEBUG local_execute{query_id="3db5e548-d16c-4c89-bb03-50a4a2684dd4" epoch=BatchQueryEpoch { epoch: Some(Current(4784052270071808)) }}: risingwave_frontend::scheduler::local: Local execution mode converts a plan with two stages
2023-07-24T23:27:26.26371+02:00  INFO pgwire_query_log: mode=(extended query parse) session=5 status=ok time=2ms sql=SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull OR (t.typtype = 'd' AND t.typnotnull) AS attnotnull,a.atttypmod,a.attlen,t.typtypmod,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, null as attidentity,null as attgenerated,pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype  FROM pg_catalog.pg_namespace n  JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid)  JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid)  JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid)  LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum)  LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid)  LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class')  LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog')  WHERE c.relkind in ('r','p','v','f','m') and a.attnum > 0 AND NOT a.attisdropped  AND n.nspname LIKE 'public' AND c.relname LIKE 'test\_table') c WHERE true  ORDER BY nspname,c.relname,attnum
2023-07-24T23:27:26.298203+02:00  INFO pgwire_query_log: mode=(extended query execute) session=5 status=ok time=33ms sql=SELECT * FROM (SELECT n.nspname, c.relname, a.attname, a.atttypid, a.attnotnull OR (t.typtype = 'd' AND t.typnotnull) AS attnotnull, a.atttypmod, a.attlen, t.typtypmod, row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, NULL AS attidentity, NULL AS attgenerated, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc, dsc.description, t.typbasetype, t.typtype FROM pg_catalog.pg_namespace AS n JOIN pg_catalog.pg_class AS c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute AS a ON (a.attrelid = c.oid) JOIN pg_catalog.pg_type AS t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef AS def ON (a.attrelid = def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description AS dsc ON (c.oid = dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class AS dc ON (dc.oid = dsc.classoid AND dc.relname = 'pg_class') LEFT JOIN pg_catalog.pg_namespace AS dn ON (dc.relnamespace = dn.oid AND dn.nspname = 'pg_catalog') WHERE c.relkind IN ('r', 'p', 'v', 'f', 'm') AND a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'test\_table') AS c WHERE true ORDER BY nspname, c.relname, attnum, params = Some([])
2023-07-24T23:27:26.298239+02:00 DEBUG local_execute{query_id="4649c26d-23b8-4bc9-8e68-e670e6437a8f" epoch=BatchQueryEpoch { epoch: Some(Current(4784052270071808)) }}: risingwave_frontend::scheduler::local: Starting to run query self.query.query_id=QueryId:4649c26d-23b8-4bc9-8e68-e670e6437a8f self.sql=""
2023-07-24T23:27:26.298295+02:00 DEBUG local_execute{query_id="4649c26d-23b8-4bc9-8e68-e670e6437a8f" epoch=BatchQueryEpoch { epoch: Some(Current(4784052270071808)) }}: risingwave_frontend::scheduler::local: Local execution mode converts a plan with two stages
2023-07-24T23:27:26.318698+02:00  INFO pgwire_query_log: mode=(extended query parse) session=5 status=ok time=0ms sql=BEGIN READ ONLY
2023-07-24T23:27:26.319209+02:00  INFO pgwire_query_log: mode=(extended query execute) session=5 status=ok time=0ms sql=BEGIN READ ONLY
2023-07-24T23:27:26.319625+02:00  INFO pgwire_query_log: mode=(extended query parse) session=5 status=ok time=0ms sql=SELECT "id" FROM "public"."test_table"

I've manually tested DBeaver works.

image

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR contains user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

@xxchan xxchan requested review from chenzl25 and yezizp2012 July 24, 2023 21:08
@github-actions github-actions bot added the type/fix Bug fix label Jul 24, 2023
@xxchan xxchan requested a review from wenym1 July 24, 2023 21:17
@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #11179 (a9b15e9) into main (57b7632) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main   #11179      +/-   ##
==========================================
- Coverage   69.73%   69.72%   -0.01%     
==========================================
  Files        1313     1313              
  Lines      224133   224133              
==========================================
- Hits       156289   156276      -13     
- Misses      67844    67857      +13     
Flag Coverage Δ
rust 69.72% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/common/src/session_config/mod.rs 33.40% <ø> (ø)
src/frontend/src/binder/expr/function.rs 85.86% <100.00%> (ø)
src/utils/pgwire/src/pg_protocol.rs 54.64% <100.00%> (ø)

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@TennyZhuang TennyZhuang added this pull request to the merge queue Jul 25, 2023
Merged via the queue into main with commit a4a5dc4 Jul 25, 2023
@TennyZhuang TennyZhuang deleted the xxchan/950 branch July 25, 2023 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DBeaver: cannot see "Materialized Views" tab Tracking: PG server version compatibility
3 participants