Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Let me put it another way, how would I write a test case to cover these lines
> of code and not receive an error from replanning?
"Hard to get to" is not the same as "dead code". An example is that
third-party add-ons might re-use plans that are not completely up to
date, if they've not been rewritten to use the plan cache.
regards, tom lane