Re: [HACKERS] Optimizer fed bad data about some system-table indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Optimizer fed bad data about some system-table indexes
Date: 1999-04-30 20:46:36
Message-ID: 29614.925505196@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> If you delete the file at the end of initdb, is it recreated with the
> proper values?

OK, let's try it ...

Sure enough, if I delete the file and then start a new backend,
it's rebuilt. Not only that, it's rebuilt with the *correct* index-
size values read from pg_class! And cost_index then gets that data
passed to it.

So this code actually is able to go out and read the database, it just
doesn't want to ;-)

I'd say this whole mechanism is unnecessary; we should just build
the data on-the-fly the way it's done in write_irels(), and eliminate
all the file reading and writing code in init_irels and write_irels.
The only thing it could possibly be doing for us is saving some backend
startup time, but I'm not able to measure any difference when I delete
the init file.

I'll work on that tomorrow, unless I hear squawks of outrage from
someone who remembers what this code was for.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-04-30 20:50:58 Re: [HACKERS] Optimizer fed bad data about some system-table indexes
Previous Message Bruce Momjian 1999-04-30 20:11:11 Re: [HACKERS] Optimizer fed bad data about some system-table indexes