diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index a0898e0..3564d52 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -1743,7 +1743,7 @@ index_build(Relation heapRelation,
 	/*
 	 * If this is an unlogged index, we need to write out an init fork for it.
 	 */
-	if (heapRelation->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED)
+	if (heapRelation->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED && !isreindex)
 	{
 		RegProcedure ambuildempty = indexRelation->rd_am->ambuildempty;
 
