PostgreSQL, Move logging after send_query, to better use the idle time waiting for the query result.

This gives a speedup of 5-10%.