From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org, ishii(at)sraoss(dot)co(dot)jp |
Subject: | Re: pgstattuple extension for indexes |
Date: | 2006-07-14 17:44:02 |
Message-ID: | 2992.1152899042@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Bruce Momjian <bruce(at)momjian(dot)us> 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
ereport(NOTICE,
(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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-14 17:50:58 | Re: [PATCHES] [patch 0/9] annual pgcrypto update |
Previous Message | Tom Lane | 2006-07-14 17:35:25 | Re: [PATCHES] c.h is the problem of msvc. |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-14 17:50:58 | Re: [PATCHES] [patch 0/9] annual pgcrypto update |
Previous Message | Tom Lane | 2006-07-14 17:35:25 | Re: [PATCHES] c.h is the problem of msvc. |