marko@joh.to writes:
> PostgreSQL version: 9.1.12
> We've been observing a performance problem where a PRIMARY KEY index is not
> being used. The problem looks like this:
In 9.2 and again in 9.3, we significantly changed the planner's modeling
of index access costs, with a view towards making better choices when
there are multiple plausible indexes to use. If you can reproduce this
misbehavior in 9.3 or later it would be worth looking into; but we're not
going to change 9.1's estimation rules at this late date. People running
on back branches tend to want plan stability in my experience.
regards, tom lane