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

Postgres protocol conveys zero tables with official 3.0 release #5745

Closed
CarsonF opened this issue Jul 6, 2023 · 10 comments · Fixed by #5777
Closed

Postgres protocol conveys zero tables with official 3.0 release #5745

CarsonF opened this issue Jul 6, 2023 · 10 comments · Fixed by #5777
Assignees

Comments

@CarsonF
Copy link

CarsonF commented Jul 6, 2023

  • EdgeDB Version: "3.0+304325b" (docker), "3.0+7d903be" (local)
  • EdgeDB CLI Version: 3.3.0+3f6a0a0
  • OS Version: docker, osx 13.2.1

Steps to Reproduce:

Try to connect following docs. Connection is successful, but introspection results in no tables.

I did have it working with RC 2 & 4, so I don't think the issue is me.

@CarsonF
Copy link
Author

CarsonF commented Jul 7, 2023

Using the psql cli

_example-> \dt+
Did not find any relations.
_example-> \dt
Did not find any relations.
_example=> SELECT *
	FROM pg_catalog.pg_tables
	WHERE schemaname != 'pg_catalog' AND
    	schemaname != 'information_schema';

   schemaname   |                 tablename                  | tableowner | tablespace | hasindexes | hasrules | hastriggers | rowsecurity
----------------+--------------------------------------------+------------+------------+------------+----------+-------------+-------------
 edgedbinstdata | instdata                                   | postgres   |            | t          | f        | f           | f
 edgedb         | _db_config                                 | postgres   |            | t          | f        | f           | f
 edgedb         | _dml_dummy                                 | postgres   |            | t          | f        | f           | f
 edgedbstd      | ac418a43-1c45-11ee-8c8c-4d24f0cc1e74       | postgres   |            | t          | f        | f           | f
 edgedbstd      | ac46ed03-1c45-11ee-b645-3b3f2ce3873d       | postgres   |            | t          | f        | f           | f
 edgedbstd      | ac4d32e6-1c45-11ee-8a70-8b13be58225a       | postgres   |            | t          | f        | f           | f
 edgedbpub      | d6a5eeb9-1c6e-11ee-9d0b-c59536b98225       | postgres   |            | t          | f        | t           | f
 edgedbpub      | d71d5214-1c6e-11ee-89a9-8339117c4abc       | postgres   |            | t          | f        | f           | f
 edgedbpub      | d6ee4ca5-1c6e-11ee-a741-55fb63108601       | postgres   |            | t          | f        | t           | f
 edgedbpub      | d72233e8-1c6e-11ee-9da5-5d45c6c0e3b5       | postgres   |            | t          | f        | t           | f
 edgedbpub      | d73a1025-1c6e-11ee-9f9d-6947cd642816       | postgres   |            | t          | f        | t           | f
 edgedbpub      | d75fb155-1c6e-11ee-9a2f-a315d9396f1f       | postgres   |            | t          | f        | f           | f
 edgedbpub      | d7604dba-1c6e-11ee-be9c-efb3cd1fa5b4       | postgres   |            | t          | f        | f           | f
 edgedbstd      | acfc1d49-1c45-11ee-a8a1-e9ea02d91602       | postgres   |            | t          | f        | f           | f
 edgedbstd      | ae0b80bd-1c45-11ee-880b-9f236a1f4ac6       | postgres   |            | t          | f        | f           | f
 edgedbstd      | ae0cb4e2-1c45-11ee-8a80-935a082f7450       | postgres   |            | t          | f        | f           | f
 edgedbstd      | ae940c6a-1c45-11ee-9ac0-ff4fd5317f34       | postgres   |            | t          | f        | f           | f
 edgedbstd      | aec1f0ba-1c45-11ee-9b98-b19e9bbb8e1f       | postgres   |            | t          | f        | f           | f
 edgedbstd      | af206de7-1c45-11ee-8c4a-9fe003a0706f       | postgres   |            | t          | f        | f           | f
 edgedbstd      | af662bce-1c45-11ee-8cfa-2b58656cdc8c       | postgres   |            | t          | f        | f           | f
 edgedbstd      | af9781b0-1c45-11ee-9739-5d812050ff66       | postgres   |            | t          | f        | f           | f
 edgedbstd      | afbfd666-1c45-11ee-8b1e-9d0e8c311e99       | postgres   |            | t          | f        | f           | f
 edgedbstd      | afe781c4-1c45-11ee-84f8-6ba9e696ef18       | postgres   |            | t          | f        | f           | f
 edgedbpub      | d760e563-1c6e-11ee-a1a8-917396ca855d       | postgres   |            | t          | f        | f           | f
 edgedbstd      | b013c76f-1c45-11ee-9c3d-3de42f5ceca1       | postgres   |            | t          | f        | f           | f
 edgedbstd      | b0381462-1c45-11ee-bb81-8fe1b008074c       | postgres   |            | t          | f        | f           | f
 edgedbpub      | d74d01e8-1c6e-11ee-ad3a-8fb557d728ab       | postgres   |            | t          | f        | t           | f
 edgedbstd      | b07ce245-1c45-11ee-b93d-69f736011d5b       | postgres   |            | t          | f        | f           | f
 edgedbpub      | d77cb452-1c6e-11ee-a524-91324f126542       | postgres   |            | t          | f        | f           | f
 edgedbstd      | b17de9d7-1c45-11ee-acb2-3185df790bf4       | postgres   |            | t          | f        | f           | f
 edgedbstd      | b1d127ab-1c45-11ee-9418-471d5b917f30       | postgres   |            | t          | f        | f           | f
 edgedbstd      | b26156a4-1c45-11ee-b9db-5578b4fc2ddc       | postgres   |            | t          | f        | f           | f

Are these normal/expected results?

@CarsonF
Copy link
Author

CarsonF commented Jul 8, 2023

I'm also getting the error in WebStorm while trying to discover schema or execute queries:

Connection was established but closed as invalid.


psql cli & Beekeeper Studio give me this while executing a query:

FATAL: 'funcname'

Ah ok. That only happens when I don't quote the table name. I wasn't aware that it was required to quote the table names.

@msullivan msullivan assigned aljazerzen and unassigned fantix Jul 11, 2023
@msullivan
Copy link
Member

I suspect this is in @aljazerzen's side of the SQL stuff

@aljazerzen
Copy link
Contributor

Duplicate of #5676. Thanks for additional debugging info.

@CarsonF
Copy link
Author

CarsonF commented Jul 11, 2023

Ah yeah the psql \d command bug is duplicated. But I wouldn't expect that to be the same problem as not being able to run any queries in JetBrains IDEs. I assume it uses a different avenue to discover schema as well, but I'm not sure how to confirm that.

@aljazerzen
Copy link
Contributor

You assumed correctly, this were 3 separate bugs. Thanks for reporting, will be released with 3.2.

@CarsonF
Copy link
Author

CarsonF commented Jul 13, 2023

Can I test this pre-release? Is it in a v4 nightly?

@msullivan
Copy link
Member

Yeah it should be in the latest nightly.

@CarsonF
Copy link
Author

CarsonF commented Jul 15, 2023

So I just upgraded to nightly. I refreshed the schema in WebStorm, and all good.
I then ran edgedb migrate and successfully applied a couple migrations. Now WebStorm is giving me the same "Connection was established but closed as invalid." error.

Seems like the edgedb server was serving valid SQL protocol, until a schema change happened.
Upon restarting the instance, the "connection was valid" again and refreshed the SQL schema fine.

Should I open a new issue? It's is/close to the same symptom, so I wasn't sure.

@aljazerzen aljazerzen reopened this Jul 16, 2023
@aljazerzen
Copy link
Contributor

Let's just use this one. I'll investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants