Proposal for changing of pg_opclass - Mailing list pgsql-hackers

From Oleg Bartunov
Subject Proposal for changing of pg_opclass
Date
Msg-id Pine.GSO.4.33.0108101726250.12908-100000@ra.sai.msu.su
Whole thread Raw
List pgsql-hackers
Hi,

we present our plans to change of index AM tables following
Tom's idea (http://fts.postgresql.org/db/mw/msg.html?mid=1025731)

" ... pg_opclass should have, not just one row for each distinct opclass name,
but one row for each supported combination of index AM and opclass name."

This change would help to create indexes with keys and values
(to be indexed) of different  types. Read some discussion in thread
http://fts.postgresql.org/db/mw/msg.html?mid=119796

We proposed to do our changes  in 2 stages for smooth transition.

I) Changes of index AM tables (pg_opclass,pg_amop) 1. pg_opclass:      Add opcamid(oid) - index type identificator from
pg_am     Add opckeytype(oid) - type of key,                if opckeytype == InvalidOid then opckeytype=opcdeftype
(opcname,opcamid)should be unique     Relation -> rd_att must be filled by using opckeytype, not     opcdeftype as
now!!    Is't worth to have index on (opcname,opcamid) ?
 
 2. pg_amop:     Add amopreqcheck(bool) - if TRUE, then results of check by index                              required
totest with original values.     At this stage we could determine index.islossy using amopreqcheck.     We could don't
useindex.islossy even at this stage but we need to know     how to determine pg_amop.reqcheck in create_indexscan_plan
  (does it's right place to check ?)
 
 After first stage completed we'll have everything we need

II) Removing unnecessary information - clearing system tables  1. remove pg_index.indislossy (see I.2) and
indhaskeytypefrom     pg_index
 
  2. remove pg_amop.amopid and pg_amproc.amid (see I.1)     Tom has sugessted
(http://fts.postgresql.org/db/mw/msg.html?mid=1025860)    it might be remained because of performance reason. Tom, do
you    have a decision ?
 

We hope to get a first version of patch in a week.
Regards,    Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Vague idea for allowing per-column locale
Next
From: Bruce Momjian
Date:
Subject: KQSO parameter