Understanding how CTEs interact with the query planner and when they act as optimization fences.
You have a query where a non-recursive CTE is referenced exactly once and filters a large table, then the outer query adds a further WHERE predicate. On PostgreSQL 12+ (default settings), which statement best describes how the planner treats this CTE and its performance implications?