diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 4acc7c3631ac4543015293dfbcdba023fcc1173b..0754455103e1fa4036ea9a56100ea1ef64c1e570 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.71 1999/05/10 00:44:55 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.72 1999/05/15 22:31:07 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -1187,7 +1187,7 @@ index_destroy(Oid indexId)
 	 */
 	ReleaseRelationBuffers(userindexRelation);
 
-	if (FileNameUnlink(relpath(userindexRelation->rd_rel->relname.data)) < 0)
+	if (mdunlink(userindexRelation) != SM_SUCCESS)
 		elog(ERROR, "amdestroyr: unlink: %m");
 
 	index_close(userindexRelation);