-
Notifications
You must be signed in to change notification settings - Fork 64
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
List Collections Bug #65
Comments
Hi @intelligencecompany , can you share the repro steps for this please? I tried the above commands in all different orders and looks like they are returning the expected output. postgres=# SELECT documentdb_api.create_collection('documentdb', 'patient');
NOTICE: creating collection
create_collection
-------------------
t
(1 row)
postgres=# SELECT cursorpage FROM documentdb_api.list_collections_cursor_first_page('documentdb', '{ "listCollections": 1 }');
cursorpage
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
{ "cursor" : { "id" : { "$numberLong" : "0" }, "ns" : "documentdb.$cmd.ListCollections", "firstBatch" : [ { "name" : "patient", "type" : "collection", "options" : { }, "info" : { "rea
dOnly" : false, "uuid" : { "$binary" : { "base64" : "ulhZWb+RR/qT1s6zxohDCQ==", "subType" : "04" } } }, "idIndex" : { "v" : { "$numberInt" : "2" }, "name" : "_id_", "key" : { "_id" : {
"$numberInt" : "1" } } } } ] }, "ok" : { "$numberDouble" : "1.0" } }
(1 row) Similarly the other way round postgres=# SELECT cursorpage FROM documentdb_api.list_collections_cursor_first_page('documentdb', '{ "listCollections": 1 }');
cursorpage
------------------------------------------------------------------------------------------------------------------------------------------------------
{ "cursor" : { "id" : { "$numberLong" : "0" }, "ns" : "documentdb.$cmd.ListCollections", "firstBatch" : [ ] }, "ok" : { "$numberDouble" : "1.0" } }
(1 row)
postgres=# SELECT documentdb_api.create_collection('documentdb', 'patient');
NOTICE: creating collection
create_collection
-------------------
t
(1 row)
postgres=# SELECT cursorpage FROM documentdb_api.list_collections_cursor_first_page('documentdb', '{ "listCollections": 1 }');
cursorpage
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
{ "cursor" : { "id" : { "$numberLong" : "0" }, "ns" : "documentdb.$cmd.ListCollections", "firstBatch" : [ { "name" : "patient", "type" : "collection", "options" : { }, "info" : { "rea
dOnly" : false, "uuid" : { "$binary" : { "base64" : "pnItZe2SR6+M5dOrO8P5gw==", "subType" : "04" } } }, "idIndex" : { "v" : { "$numberInt" : "2" }, "name" : "_id_", "key" : { "_id" : {
"$numberInt" : "1" } } } } ] }, "ok" : { "$numberDouble" : "1.0" } }
(1 row) |
Hi @diipak-bisht, Thank you for investigating. I did a clean install and tried it again, however I keep having that the connection closes.
I pulled the latest version from github |
I created a whole new github workspace but still couldn't get this. Can you help share any error logs that you see in pg log file which should be around this path |
Sure, see here the log after executing the query: 2025-02-25 18:46:31.762 UTC [44] LOG: server process (PID 584) was terminated by signal 11: Segmentation fault Will this help? |
Thanks for sharing the logs, not much debugging information though. Will it be possible for you to share the core dump for further analysis as this is hard to repro in any of my environments. I tried with Docker Desktop too as you mentioned earlier. |
SELECT cursorpage FROM documentdb_api.list_collections_cursor_first_page('documentdb', '{ "listCollections": 1 }');
disconnects the server after creating a collection.
SELECT documentdb_api.create_collection('documentdb', 'patient')
ERROR:
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
The connection to the server was lost. Attempting reset: Failed.
The text was updated successfully, but these errors were encountered: