Add ensure_index method to pool.