You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/04/19 11:04:21 UTC
[GitHub] [shardingsphere] tuichenchuxin opened a new issue, #14004: Consider supporting PostgreSQL/openGauss schema statements
tuichenchuxin opened a new issue, #14004:
URL: https://github.com/apache/shardingsphere/issues/14004
## Background
In the SharedingSphere community, we have heard a lot of exception feedback about PostgreSQL/openGauss schema, such as #15579, #15145, #14004 and #13638. In order to improve experience of PostgreSQL/openGauss users, we need to support PostgreSQL/openGauss schema now.
## How to support PostgreSQL/openGauss schema
Currently in the `config-xxx.xml` file, the actual meaning of schemaName is database, so we decided to adjust the `schemaName` configuration to `databaseName`.
In order to be compatible with the original `schemaName` configuration, users can still configure `schemaName: sharding_db` in the yaml file, which has the same effect as configuring `databaseName: sharding_db`.
```yaml
databaseName: sharding_db
dataSources:
ds_0:
url: jdbc:postgresql://127.0.0.1:5432/demo_ds_0?currentSchema=schema_0959,public
username: postgres
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
ds_1:
url: jdbc:postgresql://127.0.0.1:5432/demo_ds_1?currentSchema=schema_0959,public
username: postgres
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
```
Users can specify the `search_path` of PostgreSQL/openGauss by configuring `currentSchema=schema_0959,public`. When the user executes the SQL without the schema qualified name, the search will be performed according to the `search_path`.
When users execute `CREATE SCHEMA` or `DROP SCHEMA` statements, we will route these SQL statements to all PostgreSQL/openGauss databases for execution, and add schema information to the metadata of ShardingSphere.
In addition, we also need to support the `SET SEARCH_PATH` statement on the ShardingSphere-Proxy adaptor to allow users to switch search_path.
## Tasks
- [x] adaptors supports databaseName configuration and is compatible with schemaName
- [ ] adjust metadata loading logic to load tables under all user schemas(now just load tables under public schema)
- [ ] maintain search_path parameter in the metadata and use it when executing the statement
- [ ] adjust mode logic to support databaseName configuration @zjcnb
- [ ] add more unit test and integration test
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu closed issue #14004: Consider supporting PostgreSQL/openGauss schema statements
Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #14004: Consider supporting PostgreSQL/openGauss schema statements
URL: https://github.com/apache/shardingsphere/issues/14004
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb closed issue #14004: Consider supporting PostgreSQL/openGauss schema statements
Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #14004: Consider supporting PostgreSQL/openGauss schema statements
URL: https://github.com/apache/shardingsphere/issues/14004
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #14004: Consider supporting PostgreSQL/openGauss schema statements
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #14004:
URL: https://github.com/apache/shardingsphere/issues/14004#issuecomment-1112032155
Since this task is too big, I will split the implementation of search_path into other issues. This issue is responsible for supporting SQL execution with the schema modifier.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org