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

sql: database exists in SHOW DATABASE list after DROP #18286

Closed
nvanbenschoten opened this issue Sep 7, 2017 · 3 comments
Closed

sql: database exists in SHOW DATABASE list after DROP #18286

nvanbenschoten opened this issue Sep 7, 2017 · 3 comments
Labels
A-schema-changes C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.

Comments

@nvanbenschoten
Copy link
Member

@HeikoOnnebrink (from #17524) recently ran into some strangeness around dropping tables.
He dropped two tables but they continued to show up in SHOW TABLES queries. If he issued
further DROP TABLE requests, he would get an error pq: relation "requests" does not exist.

Looking quickly through his logs, this line stood out:

W170906 05:37:47.344467 166 sql/schema_changer.go:1072 Error executing schema change: descriptor not found

Later he tried to DROP DATABASE. Even after he issued this, the database remained in his
SHOW DATABASES queries. However, when he tries to do anything in the database,
he gets an error:

pq: no database with ID 52 found

If we want to investigate the corrupted state, we have access to this cluster via a Cisco WebEx session (you'll need a chrome plugin) at a meeting link that can be activated by Heiko on Gitter (he'll supervise while you are connected).

@nvanbenschoten
Copy link
Member Author

@vivekmenezes for triage.

@HeikoOnnebrink
Copy link

short adjustment ..
I issued several DROP TABLE commands on 6 tables... a 6 gave positive feedback, but 2 tables nonetheless still showed up in SHOW TABLES.. Accessing any of these tables returned pq: relation "xxx" does not exist
To overcome this problem I tried a DELETE DATABASE which also worked, but the logs filled up with
E170906 05:52:31.802781 372702 server/admin.go:519 database "restapipp" does not exist
After restarting cluster the database disappeared from the list of databases, but problems persist

[email protected]:26257/restapi> show databases;
+--------------------+
| Database |
+--------------------+
| crdb_internal |
| information_schema |
| pg_catalog |
| restapi |
+--------------------+
(4 rows)
[email protected]:26257/restapi> show tables;
pq: no database with ID 52 found
[email protected]:26257/restapi> show columns from postgresqldbs;
pq: no database with ID 52 found

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. labels Apr 28, 2018
@jordanlewis
Copy link
Member

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema-changes C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
Projects
None yet
Development

No branches or pull requests

5 participants