Re: Improving backend launch time by preloading relcache

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Improving backend launch time by preloading relcache
Date: 2002-01-30 06:33:03
Message-ID: 21680.1012372383@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> I thought of another idea while reading the thread [HACKERS]
> sequence indexes. Currently REINDEX recreates indexes from
> the heap relations because the indexes may be corrupted.
> However we can recreate indexes from existent ones if
> they are sane. It would be a lot faster than the current
> way for large tables.

Hmm ... you are thinking about the case where REINDEX is being used
not to recover from corruption, but just to shrink indexes that have
accumulated too much free space. Okay, that's a reasonable case to
try to optimize, though I'd like to think the problem will go away
in a release or two when we implement VACUUM-time index shrinking.

However, I'm not sure about the "lot faster" part. The only win
I can see is that when rebuilding a btree index, you could skip
the sort step by reading the old index in index order. This'd
require hacking things deep in the guts of the btree index method,
not at the level of the present REINDEX code. And AFAICS it doesn't
translate at all to the other index types.

Not sure it's worth the trouble. I'd rather see us expend the same
effort on shrinking indexes on-the-fly in VACUUM.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2002-01-30 07:54:05 Re: Improving backend launch time by preloading relcache
Previous Message Tom Lane 2002-01-30 05:56:31 Re: Syscaches should store negative entries, too