pg_am.amstrategies should be 0 when not meaningful?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: pg_am.amstrategies should be 0 when not meaningful?
Date: 2006-12-16 16:31:29
Message-ID: 304.1166286689@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

GIST and GIN currently set their amstrategies entries to 100, which is
a completely arbitrary number, since these index AMs don't impose any
particular interpretation on operator strategy numbers. Usually it's
far too large and results in wasted space in relcache entries. But it's
not impossible that it could be too small for a complex opclass.

I propose that we should set pg_am.amstrategies to zero when the index
AM doesn't have a fixed interpretation of strategy numbers. This would
make it clearer that there's no intended upper bound. It would also
cause the relcache not to bother trying to preload operator numbers,
which saves time and space --- neither of these AMs ever actually look
at the rd_operator array in relcache entries.

Comments? Can anyone think of anything that is likely to break?
(I can only see one or two trivial code adjustments that would be
needed.)

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joachim Wieland 2006-12-16 16:38:51 Re: invalid input syntax for type timestamp.
Previous Message Alvaro Herrera 2006-12-16 16:23:13 Re: Operator class group proposal