Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a50aaa72
Commit
a50aaa72
authored
Mar 01, 2000
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change reindex command to work properly with gist/hash/rtree
parent
ab3dc664
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
src/backend/access/gist/gist.c
src/backend/access/gist/gist.c
+5
-4
src/backend/access/hash/hash.c
src/backend/access/hash/hash.c
+5
-4
src/backend/access/rtree/rtree.c
src/backend/access/rtree/rtree.c
+5
-4
src/backend/catalog/index.c
src/backend/catalog/index.c
+4
-5
No files found.
src/backend/access/gist/gist.c
View file @
a50aaa72
...
...
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.5
0 2000/01/19 23:54:46 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.5
1 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
,
tru
e
);
UpdateStats
(
irelid
,
ni
,
fals
e
);
if
(
oldPred
!=
NULL
)
UpdateStats
(
hrelid
,
nh
,
inplac
e
);
UpdateStats
(
irelid
,
ni
,
inplac
e
);
if
(
oldPred
!=
NULL
&&
!
inplace
)
{
if
(
ni
==
nh
)
pred
=
NULL
;
...
...
src/backend/access/hash/hash.c
View file @
a50aaa72
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.3
5 2000/01/26 05:55:55 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.3
6 2000/03/01 05:39:22 inoue
Exp $
*
* NOTES
* This file contains only the public interface routines.
...
...
@@ -242,12 +242,13 @@ hashbuild(Relation heap,
{
Oid
hrelid
=
RelationGetRelid
(
heap
);
Oid
irelid
=
RelationGetRelid
(
index
);
bool
inplace
=
IsReindexProcessing
();
heap_close
(
heap
,
NoLock
);
index_close
(
index
);
UpdateStats
(
hrelid
,
nhtups
,
tru
e
);
UpdateStats
(
irelid
,
nitups
,
fals
e
);
if
(
oldPred
!=
NULL
)
UpdateStats
(
hrelid
,
nhtups
,
inplac
e
);
UpdateStats
(
irelid
,
nitups
,
inplac
e
);
if
(
oldPred
!=
NULL
&&
!
inplace
)
{
if
(
nitups
==
nhtups
)
pred
=
NULL
;
...
...
src/backend/access/rtree/rtree.c
View file @
a50aaa72
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.4
3 2000/01/26 05:56:00 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.4
4 2000/03/01 05:39:23 inoue
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -261,12 +261,13 @@ rtbuild(Relation heap,
{
Oid
hrelid
=
RelationGetRelid
(
heap
);
Oid
irelid
=
RelationGetRelid
(
index
);
bool
inplace
=
IsReindexProcessing
();
heap_close
(
heap
,
NoLock
);
index_close
(
index
);
UpdateStats
(
hrelid
,
nh
,
tru
e
);
UpdateStats
(
irelid
,
ni
,
fals
e
);
if
(
oldPred
!=
NULL
)
UpdateStats
(
hrelid
,
nh
,
inplac
e
);
UpdateStats
(
irelid
,
ni
,
inplac
e
);
if
(
oldPred
!=
NULL
&&
!
inplace
)
{
if
(
ni
==
nh
)
pred
=
NULL
;
...
...
src/backend/catalog/index.c
View file @
a50aaa72
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.10
6 2000/02/25 02:58:47 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.10
7 2000/03/01 05:39:24 inoue
Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -2057,7 +2057,6 @@ reindex_index(Oid indexId, bool force)
Oid
heapId
,
procId
,
accessMethodId
;
Node
*
oldPred
=
NULL
;
PredInfo
*
predInfo
;
List
*
cnfPred
=
NULL
;
AttrNumber
*
attributeNumberA
;
FuncIndexInfo
fInfo
,
*
funcInfo
=
NULL
;
int
i
,
numberOfAttributes
;
...
...
@@ -2096,8 +2095,8 @@ reindex_index(Oid indexId, bool force)
pfree
(
predString
);
}
predInfo
=
(
PredInfo
*
)
palloc
(
sizeof
(
PredInfo
));
predInfo
->
pred
=
(
Node
*
)
cnf
Pred
;
predInfo
->
oldPred
=
oldPred
;
predInfo
->
pred
=
(
Node
*
)
old
Pred
;
predInfo
->
oldPred
=
NULL
;
/* Assign Index keys to attributes array */
attributeNumberA
=
(
AttrNumber
*
)
palloc
(
numberOfAttributes
*
sizeof
(
AttrNumber
));
...
...
@@ -2247,5 +2246,5 @@ reindex_relation(Oid relid, bool force)
setRelhasindexInplace
(
relid
,
true
,
false
);
}
SetReindexProcessing
(
old
);
return
true
;
return
reindexed
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment