Re: Improving backend launch time by preloading relcache

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

Tom Lane wrote:
>
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > The change on tcop/utility.c seems to inhibit the execution
> > of REINDEX of system indexes under postmaster which I allowed
> > except some system indexes in 7.1.
>
> That strikes me as a fairly dangerous idea. Do you really
> believe it's safe? Also, why would it be safe to allow reindex
> at the table level and not at the index level, which is what
> the code did before I touched it?

REINDEX uses the relfilenode mechanism since 7.1 which
lets the replacement of index files be under transactional
control. I think it's safe enough. One thing I had to worry
about REINDEX on system indexes is how to tell that the
target index mustn't be used during the REINDEX operation.
Turning off the relhasindex column in pg_class tells
PG system that the indexes are unavailable now. It was
implemented by me before 7.0. I didn't provided the
way to inactivate indexes individually however.

>
> > Especially setNewRelfilenode() unlinks the pg_internal.init
> > file in case the relation is nailed.
>
> Probably with this change I'm planning, it'll be necessary to unlink
> pg_internal.init for any system relation, not only nailed ones.
> Thanks for pointing that out.

What I meant was to confirm if it's really reliable.
Currently e.g. the failure of rename of temporary
init file to pg_internal.init isn't fatal but it
may be fatal if we include many relcache info in
the pg_internal.init file.

regards,
Hiroshi Inoue

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2002-01-29 05:36:06 Re: 7.2 RPMs (Re: [HACKERS] PostgreSQL v7.2rc2 Released)
Previous Message Peter Eisentraut 2002-01-29 05:13:15 Re: 7.2 RPMs (Re: [HACKERS] PostgreSQL v7.2rc2 Released)