The ancestors table is created by nx_init_ancestors from the existing hierarchy table when switching to path optimizations (now the default).
This procedure is slow for big hierarchy tables and can be optimized on PostgreSQL and Oracle using recursive queries.