|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/catalog/index.c,v 1.257 2005/06/20 02:07:47 neilc Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/catalog/index.c,v 1.258 2005/06/25 16:53:49 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *
|
14 | 14 | * INTERFACE ROUTINES
|
@@ -704,13 +704,21 @@ index_create(Oid heapRelationId,
|
704 | 704 | }
|
705 | 705 |
|
706 | 706 | /*
|
707 |
| - * Fill in the index strategy structure with information from the |
708 |
| - * catalogs. First we must advance the command counter so that we |
709 |
| - * will see the newly-entered index catalog tuples. |
| 707 | + * Advance the command counter so that we can see the newly-entered |
| 708 | + * catalog tuples for the index. |
710 | 709 | */
|
711 | 710 | CommandCounterIncrement();
|
712 | 711 |
|
713 |
| -RelationInitIndexAccessInfo(indexRelation); |
| 712 | +/* |
| 713 | + * In bootstrap mode, we have to fill in the index strategy structure |
| 714 | + * with information from the catalogs. If we aren't bootstrapping, |
| 715 | + * then the relcache entry has already been rebuilt thanks to sinval |
| 716 | + * update during CommandCounterIncrement. |
| 717 | + */ |
| 718 | +if (IsBootstrapProcessingMode()) |
| 719 | +RelationInitIndexAccessInfo(indexRelation); |
| 720 | +else |
| 721 | +Assert(indexRelation->rd_indexcxt!=NULL); |
714 | 722 |
|
715 | 723 | /*
|
716 | 724 | * If this is bootstrap (initdb) time, then we don't actually fill in
|
|