peloton icon indicating copy to clipboard operation
peloton copied to clipboard

Check database existence before connecting

Open schedutron opened this issue 7 years ago • 5 comments

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?

schedutron avatar Feb 23 '18 17:02 schedutron

Coverage Status

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

coveralls avatar Feb 23 '18 19:02 coveralls

@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.

schedutron avatar Feb 25 '18 20:02 schedutron

@ChTimTsubasa Can you help @schedutron with this?

apavlo avatar Feb 25 '18 20:02 apavlo

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.

ChTimTsubasa avatar Feb 26 '18 19:02 ChTimTsubasa

Related to #1164

eribeiro avatar Apr 09 '18 10:04 eribeiro