1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Get rid of bogus use of heap_mark4update in reindex operations (cf.

recent bug report).  Fix processing of nailed-in-cache indexes;
it appears that REINDEX DATABASE has been broken for months :-(.
This commit is contained in:
Tom Lane
2002-09-23 00:42:48 +00:00
parent df3e7b3a51
commit bc1088c28a
4 changed files with 132 additions and 168 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.89 2002/09/19 23:40:56 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.90 2002/09/23 00:42:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -110,7 +110,7 @@ DefineIndex(RangeVar *heapRelation,
if (!IsBootstrapProcessingMode() &&
IsSystemRelation(rel) &&
!IndexesAreActive(relationId, false))
!IndexesAreActive(rel))
elog(ERROR, "Existing indexes are inactive. REINDEX first");
heap_close(rel, NoLock);

View File

@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.238 2002/09/20 19:56:01 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.239 2002/09/23 00:42:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -894,7 +894,7 @@ full_vacuum_rel(Relation onerel, VacuumStmt *vacstmt)
{
vac_close_indexes(nindexes, Irel);
Irel = (Relation *) NULL;
activate_indexes_of_a_table(RelationGetRelid(onerel), false);
activate_indexes_of_a_table(onerel, false);
}
#endif /* NOT_USED */
@ -947,7 +947,7 @@ full_vacuum_rel(Relation onerel, VacuumStmt *vacstmt)
#ifdef NOT_USED
if (reindex)
activate_indexes_of_a_table(RelationGetRelid(onerel), true);
activate_indexes_of_a_table(onerel, true);
#endif /* NOT_USED */
/* update shared free space map with final free space info */