Move db_string building into the pg instantiation function

Add application_name to the db_string