mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +03:00
Reindex of shared system indexes must be overwrite mode.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.44 2001/01/24 19:42:52 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.45 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);
|
||||
|
||||
|
Reference in New Issue
Block a user