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

Schema 'root' doesn't exist in ShardingSphere-Proxy 5.0 #15145

Closed
wyxabd opened this issue Jan 28, 2022 · 12 comments
Closed

Schema 'root' doesn't exist in ShardingSphere-Proxy 5.0 #15145

wyxabd opened this issue Jan 28, 2022 · 12 comments

Comments

@wyxabd
Copy link

wyxabd commented Jan 28, 2022

use PostgreSQL
For example::select * from “root”.pagemanage
ERROR: Schema 'root' doesn't exist.

@RaigorJiang
Copy link
Contributor

Hi @wyxabd
ShardingSphere manages distributed databases and coordinates data through logical schemas. If you do not create a root schema in ShardingSphere, it does not exist.

@wyxabd
Copy link
Author

wyxabd commented Jan 29, 2022

root schema is existed,but show ERROR

@RaigorJiang
Copy link
Contributor

Please provide your schema configuration.

@wyxabd
Copy link
Author

wyxabd commented Jan 29, 2022

schemaName: jdt

dataSources:
primary_ds:
url: jdbc:postgresql://10.25.108.163:5432/jdt
username: postgres
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
replica_ds_0:
url: jdbc:postgresql://10.25.108.161:5432/jdt
username: postgres
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1

replica_ds_1:

url: jdbc:postgresql://127.0.0.1:5432/demo_replica_ds_1

username: postgres

password: postgres

connectionTimeoutMilliseconds: 30000

idleTimeoutMilliseconds: 60000

maxLifetimeMilliseconds: 1800000

maxPoolSize: 50

minPoolSize: 1

rules:

  • !READWRITE_SPLITTING
    dataSources:
    pr_ds:
    writeDataSourceName: primary_ds
    readDataSourceNames:
    - replica_ds_0

- replica_ds_1

@RaigorJiang
Copy link
Contributor

schemaName: jdt

dataSources: primary_ds: url: jdbc:postgresql://10.25.108.163:5432/jdt username: postgres password: 123456

Hi @wyxabd
From your configuration, the logic schema name is jdt, not root.
In ShardingSphere, users can not use pg schema in SQL, it shoud be logic schema.

@wyxabd
Copy link
Author

wyxabd commented Jan 29, 2022

use PostgreSQL
jdt is DatabaseName
root is SchemaName

@RaigorJiang
Copy link
Contributor

@wyxabd
I understand what you mean, in PostgreSQL, database and schema have different meanings, but in ShardingSphere, database and schema both refer to logical database (or logic schema), which is somewhat different from using Postgres directly.

@RaigorJiang
Copy link
Contributor

There is a related issue: #14004

@ZengYu1
Copy link

ZengYu1 commented Mar 2, 2022

@RaigorJiang Hi, So how to access the schema of "root"

@RaigorJiang
Copy link
Contributor

@ZengYu1 Can't do it now, can only use public schema

@github-actions
Copy link

github-actions bot commented Oct 8, 2022

Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.

@github-actions github-actions bot closed this as completed Oct 8, 2022
@apache apache deleted a comment from ZengYu1 Oct 9, 2022
@apache apache deleted a comment from ZengYu1 Oct 9, 2022
@taojintianxia taojintianxia reopened this Oct 10, 2022
@TeslaCN
Copy link
Member

TeslaCN commented Dec 26, 2022

Schema supporting is improved in later version.

@TeslaCN TeslaCN closed this as completed Dec 26, 2022
@apache apache deleted a comment from ZengYu1 Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants