Bruce Momjian <[EMAIL PROTECTED]> writes:
> Patch applied.  Thanks.

>> Also, I added an experimental feature for btree indexes. It checks
>> fragmentation factor of indexes. If an leaf has the right link on the next
>> adjacent page in the file, it is assumed to be continuous (not fragmented).
>> It will help us to decide when to REINDEX.

This was done in an entirely unacceptable way, to wit

        (errmsg("%.2f%% fragmented",
            100.0 * (stat.forward + stat.backward) /
            (stat.continuous + stat.forward + stat.backward)),
        errhint("continuous=%llu, forward=%llu, backward=%llu",
            stat.continuous, stat.forward, stat.backward)));

The really serious problem with reporting this info via NOTICE is that
there's no way for a program to get its hands on the info.  The output
tuple format needs to be extended instead.

The lesser problem that drew my attention is that %llu is unportable
(and in fact draws gcc warnings for me; did you ignore that?).  But
using UINT64_FORMAT instead would create a headache for translation
because the string would vary across platforms.

I won't bother correcting the violations of message style guidelines,
because this code simply has to go away.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not

Reply via email to