I wrote:
> On top of that, we have the issue I was concerned about that there is
> no mechanism for clearing the cache-busy flags during xact abort.
Hmm, brain cells must be fading fast. On looking into the code I
find that there *is* such a mechanism --- installed by yours truly,
only three months ago.
Still, I think getting rid of the test altogether is a better answer.
regards, tom lane