Re: refactor index build - Mailing list pgsql-patches

From Tom Lane
Subject Re: refactor index build
Date
Msg-id 455.1115788986@sss.pgh.pa.us
Whole thread Raw
In response to refactor index build  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.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

pgsql-patches by date:

Previous
From: "John Hansen"
Date:
Subject: Re: lastval()
Next
From: Tom Lane
Date:
Subject: Re: lastval()