Re: CREATE INDEX ... ONLINE - Mailing list pgsql-patches

From Tom Lane
Subject Re: CREATE INDEX ... ONLINE
Date
Msg-id 5379.1155820497@sss.pgh.pa.us
Whole thread Raw
In response to Re: CREATE INDEX ... ONLINE  (Greg Stark <gsstark@mit.edu>)
List pgsql-patches
Greg Stark <gsstark@mit.edu> writes:
> Just remembered one open question I had. I'm not clear what to do with the
> index statistics. It may be that the current code is basically the right thing
> -- it leaves the statistics as they are after phase 1, ie after the regular
> index build before we go through looking for newly added tuples.

We could update them, but if there's really all that much change then
this command is going to suck pretty badly anyway :-(.

Given the current planner behavior (get actual relation length and
multiply by reltuples/relpages to estimate tuple count), the original
reltuples and relpages are probably good enough anyhow.  A big change
in index density during phase 2 seems even less likely.

            regards, tom lane

pgsql-patches by date:

Previous
From: Greg Stark
Date:
Subject: Re: CREATE INDEX ... ONLINE
Next
From: Chris Mair
Date:
Subject: Re: selecting large result sets in psql using cursors