Effect of pressure gradient in the connection region on the stability of the edge pedestal