"Jim C. Nasby" <jnasby@pervasive.com> writes:
> What about not updating if the tuplecount is within X percent? Would
> that be safe enough to back-port?
Even if you got agreement that it was a good idea (I don't think so
myself), it wouldn't help Wes, at least not for values of X smaller
than 100. Presumably, that first CREATE INDEX is trying to update
reltuples from zero to reality.
Also, the first CREATE INDEX has to set relhasindex = true, and that's
not fuzzy at all.
regards, tom lane