Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Check database existence before connecting#1165

Open
schedutron wants to merge 1 commit intocmu-db:masterfrom
schedutron:dbconnect
Open

Check database existence before connecting#1165
schedutron wants to merge 1 commit intocmu-db:masterfrom
schedutron:dbconnect

Conversation

@schedutron
Copy link
Contributor

For #1164. @pmenon Can you please add the in progress label? Also, to check for database existence in traffic_cop.h, we need access to the Catalog object, right? Can you please hint me on how do we do that?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 76.852% when pulling 2afd501 on schedutron:dbconnect into 4f1bf3e on cmu-db:master.

@schedutron schedutron changed the title Check database existence before connecting (in progress) Check database existence before connecting Feb 25, 2018
@schedutron
Copy link
Contributor Author

@pmenon Can you please hint me on how do I accomplish this check? I basically need to check for membership in a set of available databases' names.

@apavlo
Copy link
Member

apavlo commented Feb 25, 2018

@ChTimTsubasa Can you help @schedutron with this?

@ChTimTsubasa
Copy link
Member

The place you might want to insert the code to check the database existence is in https://github.com/cmu-db/peloton/blob/master/src/network/postgres_protocol_handler.cpp#L1118, where the protocol handler is checking the existence of the packet and send back a response. You might want to check what would be the correct response to send back. Using Wireshark on psql and Postgres would help.

@eribeiro
Copy link
Contributor

eribeiro commented Apr 9, 2018

Related to #1164

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants