apache / apache/shardingsphere

\d throws parse error in the new logic database when proxy-frontend-database-protocol-type is not configured

Open
#25,734 0 comments 0 reactions 0 assignees View on GitHub
in: kernel type: bug
Dominant language
Java
Stars
20.8k
Forks
6.9k
Avg merge
11h 35m
Merged PRs (30d)
326

Description

## Bug Report

**For English only**, other languages will not accept.

Before report a bug, make sure you have:

- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.

Please answer these questions before submitting your issue. Thanks!

### Which version of ShardingSphere did you use?
master d7b5bf6064a1de136186db8f7f0be507cdef67c3

### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy with PostgreSQL

### Expected behavior
execute
```sql
create database test;

\c test

\d
```
echo Did not find any relations.

### Actual behavior
image

After I add config
```yaml
props:
proxy-frontend-database-protocol-type: PostgreSQL
```
The error did not recur

### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
```yaml
databaseName: sharding_db

dataSources:
ds_0:
url: jdbc:postgresql://127.0.0.1:5432/demo_ds
username: postgres
password: postgres
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the PostgreSQL ShardingSphere-Proxy sequence in the issue: create the database, connect with \c, then run \d without proxy-frontend-database-protocol-type configured. Compare this with the same sequence after setting the property; done means \d no longer produces a parse error without requiring that configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.