Close prepared statement in transaction Exec to reduce PostgreSQL resource consumption