peloton
peloton copied to clipboard
Check database existence before connecting
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?
Coverage decreased (-0.007%) to 76.852% when pulling 2afd501d57c98aba4a9b8e8d653215136adb7d06 on schedutron:dbconnect into 4f1bf3e9ff8072e560d53cc893219c2f1d6c1e25 on cmu-db:master.
@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.
@ChTimTsubasa Can you help @schedutron with this?
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.
Related to #1164