While I'm looking at this: there seems to be a bug/inconsistency inheap_xlog_freeze(). It uses a cleanup lock in the "normal" code path,but it doesn't tell RestoreBkpBlocks to use a cleanup lock. Whichchoice is correct?
regards, tom lane