> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > I can easily have pg_index.indisclustered updated to 'true' if you ever
> > CLUSTER the index.  Is that useful to anyone?  Remember, clustering
> > doesn't remain if you modify the table.
> 
> I don't see any value in it as long as CLUSTER is in the disreputable
> shape it's in.  I don't really like giving people the impression that
> CLUSTER is a supported operation ;-)

OK, I have an idea!

1)  Set pg_index.indisclustered during CLUSTER
2)  Clear pg_index.indisclustered during vacuum if any tuples are expired
3)  or, have vacuum auto-CLUSTER the table as part of vacuum
4)  Use pg_index.indisclustered in the optimizer

Of course, this assumes we have all the CLUSTER problems fixed.

FYI, we now have a CLUSTER section in the TODO list which says:

* CLUSTER
        * cluster all tables at once
        * prevent lose of indexes, permissions, inheritance
        * Automatically keep clustering on a table
        * Keep statistics about clustering, perhaps during VACUUM ANALYZE
          [optimizer]

Doesn't look too bad.

FYI, the reference to pg_index.indisclustered in ODBC was assuming it
meant it was a hash index, which is just plain wrong, so that code is
not coming back.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to