How to get the information of the optimizer of PostgreSQL?
You can get some of that information by turning on the configuration parameter log_planner_stats.  Most of that information, however, doesn't really exist, because the planner does not fully compute all alternative plans and their costs.  It only explores an alternative plan until it can determine that it is slower than the current best plan.  So alternative plans are not fully materialized.