Let $R$ be a commutative ring, we say that $\mathcal{ A}\subseteq Spec(R)$ has prime avoidance property, if $I\subseteq \bigcup_{ P\in\mathcal{ A}}P$ for an ideal $I$ of $R$, then there exists $P\in\mathcal{ A}$ such that $I\subseteq P$. We exactly determine when $\mathcal{ A}\subseteq Spec(R)$ has prime avoidance property. In particular, if $\mathcal{ A}$ has prime avoidance property, then $\mathcal{ A}$ is compact. For certain classical rings we show the converse holds (such as Bezout rings, $QR$-domains, zero-dimensional rings and $C(X)$). We give an example of a compact set $\mathcal{ A}\subseteq Spec(R)$, where $R$ is a Prufer domain, which has not $P.A$-property. Finally, we show that if $V,V_1,\ldots, V_n$ are valuation domains for a field $K$ and $V[x]\nsubseteq \bigcup_{ i=1}^n V_i$ for some $x\in K$, then there exists $v\in V$ such that $v+x\notin \bigcup_{ i=1}^n V_i$.
Categories: math.AC