diff --git a/src/backend/catalog/pg_inherits.c b/src/backend/catalog/pg_inherits.c
index 245a374..b83e248 100644
--- a/src/backend/catalog/pg_inherits.c
+++ b/src/backend/catalog/pg_inherits.c
@@ -126,19 +126,6 @@ find_inheritance_children(Oid parentrelId, LOCKMODE lockmode)
 		{
 			/* Get the lock to synchronize against concurrent drop */
 			LockRelationOid(inhrelid, lockmode);
-
-			/*
-			 * Now that we have the lock, double-check to see if the relation
-			 * really exists or not.  If not, assume it was dropped while we
-			 * waited to acquire lock, and ignore it.
-			 */
-			if (!SearchSysCacheExists1(RELOID, ObjectIdGetDatum(inhrelid)))
-			{
-				/* Release useless lock */
-				UnlockRelationOid(inhrelid, lockmode);
-				/* And ignore this relation */
-				continue;
-			}
 		}
 
 		list = lappend_oid(list, inhrelid);
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index b7c87b9..62c8860 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -1120,10 +1120,10 @@ RemoveRelations(DropStmt *drop)
 }
 
 /*
- * Before acquiring a table lock, check whether we have sufficient rights.
- * In the case of DROP INDEX, also try to lock the table before the index.
- * Also, if the table to be dropped is a partition, we try to lock the parent
- * first.
+ * Before acquiring a table lock, check whether we have sufficient rights.  In
+ * the case of DROP INDEX, also try to lock the table before the index.  Also,
+ * if the table to be dropped is a partition or inheritance children, we try
+ * to lock the parent first.
  */
 static void
 RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid,
@@ -1229,6 +1229,26 @@ RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid,
 		if (OidIsValid(state->partParentOid))
 			LockRelationOid(state->partParentOid, AccessExclusiveLock);
 	}
+
+	/* the same for all inheritance parents */
+	if (relOid != oldRelOid)
+	{
+		Relation	inhrel;
+		SysScanDesc	scan;
+		HeapTuple	inhtup;
+
+		inhrel = heap_open(InheritsRelationId, AccessShareLock);
+		scan = systable_beginscan(inhrel, InvalidOid, false, NULL, 0, NULL);
+		while (HeapTupleIsValid(inhtup = systable_getnext(scan)))
+		{
+			Form_pg_inherits inh = (Form_pg_inherits) GETSTRUCT(inhtup);
+
+			if (inh->inhrelid == relOid && OidIsValid(inh->inhparent))
+				LockRelationOid(inh->inhparent, AccessExclusiveLock);
+		}
+		systable_endscan(scan);
+		heap_close(inhrel, AccessShareLock);
+	}
 }
 
 /*
