*** a/src/backend/commands/tablecmds.c
--- b/src/backend/commands/tablecmds.c
***************
*** 4367,4376 **** ATSimpleRecursion(List **wqueue, Relation rel,
  				  AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode)
  {
  	/*
! 	 * Propagate to children if desired.  Non-table relations never have
! 	 * children, so no need to search in that case.
  	 */
! 	if (recurse && rel->rd_rel->relkind == RELKIND_RELATION)
  	{
  		Oid			relid = RelationGetRelid(rel);
  		ListCell   *child;
--- 4367,4379 ----
  				  AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode)
  {
  	/*
! 	 * Propagate to children if desired.  Relations other than plain tables
! 	 * and foreign tables never have children, so no need to search in that
! 	 * case.
  	 */
! 	if (recurse &&
! 		(rel->rd_rel->relkind == RELKIND_RELATION ||
! 		 rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE))
  	{
  		Oid			relid = RelationGetRelid(rel);
  		ListCell   *child;
