diff options
author | Hiroshi Inoue <inoue@tpf.co.jp> | 2000-03-01 05:39:24 +0000 |
---|---|---|
committer | Hiroshi Inoue <inoue@tpf.co.jp> | 2000-03-01 05:39:24 +0000 |
commit | a50aaa7289732049e1e00cb0e61fd21af2957a83 (patch) | |
tree | 39bd4dabb48448a2d0a71190c4ab097a2f16b2aa /src/backend/access/gist/gist.c | |
parent | ab3dc6642632c83bc2132e4f0a0ed392668919ff (diff) | |
download | postgresql-a50aaa7289732049e1e00cb0e61fd21af2957a83.tar.gz postgresql-a50aaa7289732049e1e00cb0e61fd21af2957a83.zip |
Change reindex command to work properly with gist/hash/rtree
Diffstat (limited to 'src/backend/access/gist/gist.c')
-rw-r--r-- | src/backend/access/gist/gist.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index edebfcbebe3..78a41dbb8ff 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -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; |