Re: refactor index build

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: refactor index build
Date: 2005-05-11 05:23:06
Message-ID: 455.1115788986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> writes:
> This patch refactors away some duplicated code in the index AM build
> methods: they all invoke UpdateStats() since they have computed the
> number of heap tuples, so I created a function in catalog/index.c that
> each AM calls. This is per earlier discussion

No objection here, although it seems like only a minor issue.

The part of index build that's always gotten my goat is the business
about bootstrap mode opening and closing stuff in different places than
normal mode (see the XXX near the bottom of index_create). If you're
feeling like improving the code cleanliness in this area, that would be
a great little exercise.

(For that matter, I suspect the bootstrap-time distinction between index
define and index build is not needed any more at all; we define them all
in a row at the end of bootstrap, so why not fill them in when defined
and make it exactly like the normal CREATE INDEX path?)

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-05-11 05:28:16 Re: lastval()
Previous Message John Hansen 2005-05-11 04:22:17 Re: lastval()