Work around 'Invalid read' in pdo_pgsql_handle_factory