mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
change reindex ERROR/NOTICE message
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.25 2000/04/25 02:45:54 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.26 2000/04/25 10:38:38 inoue Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -714,7 +714,8 @@ ReindexIndex(const char *name, bool force /* currently unused */ )
|
||||
((Form_pg_class) GETSTRUCT(tuple))->relkind);
|
||||
}
|
||||
|
||||
reindex_index(tuple->t_data->t_oid, force);
|
||||
if (!reindex_index(tuple->t_data->t_oid, force))
|
||||
elog(NOTICE, "index '%s' wasn't reindexed", name);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -744,7 +745,8 @@ ReindexTable(const char *name, bool force)
|
||||
((Form_pg_class) GETSTRUCT(tuple))->relkind);
|
||||
}
|
||||
|
||||
reindex_relation(tuple->t_data->t_oid, force);
|
||||
if (!reindex_relation(tuple->t_data->t_oid, force))
|
||||
elog(NOTICE, "table '%s' wasn't reindexed", name);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -806,7 +808,6 @@ ReindexDatabase(const char *dbname, bool force, bool all)
|
||||
elog(ERROR, "REINDEX DATABASE: Can be executed only on the currently open database.");
|
||||
|
||||
heap_close(relation, NoLock);
|
||||
/** reindex_database(db_id, force, !all); **/
|
||||
|
||||
CommonSpecialPortalOpen();
|
||||
pmem = CommonSpecialPortalGetMemory();
|
||||
@ -847,7 +848,8 @@ ReindexDatabase(const char *dbname, bool force, bool all)
|
||||
for (i = 0; i < relcnt; i++)
|
||||
{
|
||||
StartTransactionCommand();
|
||||
reindex_relation(relids[i], force);
|
||||
if (reindex_relation(relids[i], force))
|
||||
elog(NOTICE, "relation %d was reindexed", relids[i]);
|
||||
CommitTransactionCommand();
|
||||
}
|
||||
CommonSpecialPortalClose();
|
||||
|
Reference in New Issue
Block a user