Resolve circular psycopg2 dependency