Trying threaded psycopg2