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
34822e51
Commit
34822e51
authored
Feb 23, 2001
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reindex of shared system indexes must be overwrite mode.
parent
5735c4cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
src/backend/catalog/index.c
src/backend/catalog/index.c
+21
-2
src/backend/commands/indexcmds.c
src/backend/commands/indexcmds.c
+5
-2
No files found.
src/backend/catalog/index.c
View file @
34822e51
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.14
0 2001/01/29 00:39:16 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.14
1 2001/02/23 09:26:14 inoue
Exp $
*
*
* INTERFACE ROUTINES
...
...
@@ -2087,7 +2087,12 @@ reindex_index(Oid indexId, bool force, bool inplace)
#ifndef OLD_FILE_NAMING
if
(
!
inplace
)
setNewRelfilenode
(
iRel
);
{
inplace
=
IsSharedSystemRelationName
(
NameStr
(
iRel
->
rd_rel
->
relna
me
));
if
(
!
inplace
)
setNewRelfilenode
(
iRel
);
}
#endif
/* OLD_FILE_NAMING */
/* Obtain exclusive lock on it, just to be sure */
LockRelation
(
iRel
,
AccessExclusiveLock
);
...
...
@@ -2196,6 +2201,20 @@ reindex_relation(Oid relid, bool force)
elog
(
ERROR
,
"the target relation %u is nailed"
,
relid
);
}
#endif
/* ENABLE_REINDEX_NAILED_RELATIONS */
/*
* Shared system indexes must be overwritten because it's
* impossible to update pg_class tuples of all databases.
*/
if
(
IsSharedSystemRelationName
(
NameStr
(
rel
->
rd_rel
->
relname
)))
{
if
(
IsIgnoringSystemIndexes
())
{
overwrite
=
true
;
deactivate_needed
=
true
;
}
else
elog
(
ERROR
,
"the target relation %u is shared"
,
relid
);
}
RelationClose
(
rel
);
#endif
/* OLD_FILE_NAMING */
old
=
SetReindexProcessing
(
true
);
...
...
src/backend/commands/indexcmds.c
View file @
34822e51
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.4
4 2001/01/24 19:42:52 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.4
5 2001/02/23 09:26:14 inoue
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -633,6 +633,7 @@ void
ReindexIndex
(
const
char
*
name
,
bool
force
/* currently unused */
)
{
HeapTuple
tuple
;
bool
overwrite
=
false
;
/* ----------------
* REINDEX within a transaction block is dangerous, because
...
...
@@ -656,7 +657,9 @@ ReindexIndex(const char *name, bool force /* currently unused */ )
#ifdef OLD_FILE_NAMING
if
(
!
reindex_index
(
tuple
->
t_data
->
t_oid
,
force
,
false
))
#else
if
(
!
reindex_index
(
tuple
->
t_data
->
t_oid
,
force
,
false
))
if
(
IsIgnoringSystemIndexes
())
overwrite
=
true
;
if
(
!
reindex_index
(
tuple
->
t_data
->
t_oid
,
force
,
overwrite
))
#endif
/* OLD_FILE_NAMING */
elog
(
NOTICE
,
"index
\"
%s
\"
wasn't reindexed"
,
name
);
...
...
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