agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Paul M. Aoki <aoki@CS.Berkeley.EDU>
To: Wolf-D. Ihlenfeldt <wolf@molout.tutkie.tut.ac.jp>
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: Private indices on system catalogs ?
Date: Thu, 21 Jul 94 01:31:05 -0700
Message-ID: <199407210831.BAA14595@faerie.CS.Berkeley.EDU> (raw)
In-Reply-To: <9407191059.AA05521@molout.tutkie.tut.ac.jp>

wolf@molout.tutkie.tut.ac.jp (Wolf-D. Ihlenfeldt) writes:
> and rebuilding it cures the symptoms, but why is the pg_attribute
> index not updated when new attributes are added (which happens when
> I create new relations). Is it because the index in mine, not 
> belonging to user postgres ? Or are there other arcane reasons ?

for user indices, index update is done by the query executor.
whenever you insert a new row, the executor updates all of
the indices for you.

the code that inserts new data into the system catalogs (e.g.,
when you "create" a table, the code that inserts entries into 
pg_class and pg_attribute) knows exactly what indices are 
"supposed" to be defined and updates only those indices.  that 
is, it bypasses the query executor and makes direct access 
method calls based on some hardwired code.

the hash am does seem to be pretty fast but nobody here ever had 
a chance to beat on it enough to instill a lot of confidence in it.
--
  Paul M. Aoki          |  University of California at Berkeley
  aoki@CS.Berkeley.EDU  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: aoki@CS.Berkeley.EDU, wolf@molout.tutkie.tut.ac.jp
  Subject: Re: Private indices on system catalogs ?
  In-Reply-To: <199407210831.BAA14595@faerie.CS.Berkeley.EDU>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox