@@ -1189,8 +1189,7 @@ index_create(Relation heapRelation,
1189
1189
}
1190
1190
else
1191
1191
{
1192
- index_build (heapRelation , indexRelation , indexInfo , isprimary , false,
1193
- true);
1192
+ index_build (heapRelation , indexRelation , indexInfo , false, true);
1194
1193
}
1195
1194
1196
1195
/*
@@ -2220,13 +2219,9 @@ index_update_stats(Relation rel,
2220
2219
* entries of the index and heap relation as needed, using statistics
2221
2220
* returned by ambuild as well as data passed by the caller.
2222
2221
*
2223
- * isprimary tells whether to mark the index as a primary-key index.
2224
2222
* isreindex indicates we are recreating a previously-existing index.
2225
2223
* parallel indicates if parallelism may be useful.
2226
2224
*
2227
- * Note: when reindexing an existing index, isprimary can be false even if
2228
- * the index is a PK; it's already properly marked and need not be re-marked.
2229
- *
2230
2225
* Note: before Postgres 8.2, the passed-in heap and index Relations
2231
2226
* were automatically closed by this routine. This is no longer the case.
2232
2227
* The caller opened 'em, and the caller should close 'em.
@@ -2235,7 +2230,6 @@ void
2235
2230
index_build (Relation heapRelation ,
2236
2231
Relation indexRelation ,
2237
2232
IndexInfo * indexInfo ,
2238
- bool isprimary ,
2239
2233
bool isreindex ,
2240
2234
bool parallel )
2241
2235
{
@@ -3702,7 +3696,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
3702
3696
3703
3697
/* Initialize the index and rebuild */
3704
3698
/* Note: we do not need to re-establish pkey setting */
3705
- index_build (heapRelation , iRel , indexInfo , false, true, true);
3699
+ index_build (heapRelation , iRel , indexInfo , true, true);
3706
3700
}
3707
3701
PG_CATCH ();
3708
3702
{
0 commit comments