>> I _am_ contemplating a C version that would do far more than just
>> upgrades. I'm thinking of a pg_repair utility that could rebuild and
>> repair the on-disk structures. It would also facilitate database
>> recovery after a crash -- might be a real bear to do right. Comments?
> A bear.
Indeed, but also an incredibly valuable contribution if you can pull it
off. If you want to tackle this task, don't let us discourage you!
regards, tom lane