1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

Change reindex command to work properly with gist/hash/rtree

This commit is contained in:
Hiroshi Inoue
2000-03-01 05:39:24 +00:00
parent ab3dc66426
commit a50aaa7289
4 changed files with 19 additions and 17 deletions

View File

@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.50 2000/01/19 23:54:46 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.51 2000/03/01 05:39:20 inoue Exp $
*
*-------------------------------------------------------------------------
*/
@ -284,12 +284,13 @@ gistbuild(Relation heap,
{
Oid hrelid = RelationGetRelid(heap);
Oid irelid = RelationGetRelid(index);
bool inplace = IsReindexProcessing();
heap_close(heap, NoLock);
index_close(index);
UpdateStats(hrelid, nh, true);
UpdateStats(irelid, ni, false);
if (oldPred != NULL)
UpdateStats(hrelid, nh, inplace);
UpdateStats(irelid, ni, inplace);
if (oldPred != NULL && !inplace)
{
if (ni == nh)
pred = NULL;