I am looking for a local integral domain $(D, m)$ with $Spec(D)=\{0,m\}\cup\{ P_i\}_i$ such that $P_i's$ are incomparable (that is, $P_i\not\subseteq P_j$ and $P_j\not\subseteq P_i$ for $i\not= j$) and $\cap_i P_i=0$ and $\cup_i P_i\not=m$, where $Spec(D)$ is the set of all prime ideals of $D$ ($D$ is not Noetherian in general).

2$\begingroup$ Do you insist that $\mathrm{Spec}(D)$ should be countable? $\endgroup$– Laurent MoretBaillyCommented Jul 20, 2022 at 13:20

1$\begingroup$ @Laurent MoretBailly: I edited the question. No $Spec(D)$ need not be countable. $\endgroup$– AntonyCommented Jul 21, 2022 at 19:30
2 Answers
Let $k$ be a field. Put $R=k[[x,y]]$ and let $D\subset R$ be the subring $k+xR$. It consists of power series without any term $ay^n$ ($a\in k^\times$, $n>0$), or (equivalently) series $f(x,y)$ such that $f(0,y)\in k$. It is easy to see that $D$ is local with maximal ideal $m=\{f\in D\mid f(0,0)=0\}$.
I claim that $D$ is as required.
First, $D[x^{1}]\to R[x^{1}]$ is an isomorphism: it is clearly injective by localization, and surjective because for $g\in R$ and $m\in\mathbb{N}$, we have $x^{m}g=x^{m1}(xg)$ and $xg\in D$. Thus, the nonzero primes $P_i$ of $D$ not containing $x$ correspond bijectively to the primes of height one in $R$ distinct from $xR$, and there are infinitely many of these. On the other hand, we have $m^2\subset xD$ (check!), so the only prime of $D$ containing $x$ is $m$. Since $x$ is not in any of the $P_i$'s, their union is not $m$.
Here is a geometric explanation: we can view $D$ as the fibre product ring $R\times_{R/xR}k$. It follows that the natural diagram $$\begin{array}{rcl} \mathrm{Spec}(R/xR) & \longrightarrow & \mathrm{Spec}(R) \\ \downarrow\;&&\;\downarrow\\ \mathrm{Spec}(k) & \longrightarrow & \mathrm{Spec}(D) \end{array}$$ is a pushout of ringed spaces; this is Theorem 5.1 in this paper by Ferrand. In other words, $\mathrm{Spec}(D)$ is obtained from $\mathrm{Spec}(R)$ by ``crushing'' the closed subset $\mathrm{Spec}(R/xR)\cong \mathrm{Spec}(k[[y]])$ to the point $\mathrm{Spec}(k)$.
Put $D_0 = \mathbb{Q}[T,X_1,X_2,\cdots]/I_0$, where $I_0$ is generated by the elements $X_i^2TX_{i+1}$, for every $i \in \mathbb{N}$. This is a domain. Let $\mathfrak{m}_0$ $=$ $(T,X_1,X_2,\cdots)$, and take $D = (D_0)_{\mathfrak{m}_0}$, a local ring with maximal ideal $\mathfrak{m} = \mathfrak{m}_0 D$.
We have $D_0 = \varinjlim D_n$, where $D_n = \mathbb{Q}[T,X_1,X_2,\cdots,X_n]/I_n$, with $I_n$ generated by the $X_i^2TX_{i+1}$ for $i < n$. Since the $D_n$ have Krull dimension 2, It follows that $\mathrm{dim}(D_0) = 2$, and hence $\mathrm{dim}(D) = 2$ as well.
The only prime ideal of $D$ that contains $T$ (or rather, its image in $D$) is $\mathfrak{m}$, which is of height 2, so $\mathfrak{m}$ is not the union of the height 1 primes of $D$.
Let $R = \mathbb{Q}[T,X_1]$. It is a subring of $D_0$. If $\mathfrak{p}$ and $\mathfrak{q}$ are different height 1 prime ideals of $D_0$ contained in $\mathfrak{m}_0$ with $\mathfrak{p} \cap R$ = $\mathfrak{q} \cap R$, there is an $a$ with $a \in \mathfrak{p}  \mathfrak{q}$, say. As $TX_2=X_1^2$, $TX_3=X_2^2$, etc., in $D_0$, there exists an $n$ such that $T^na$ $\in$ $R$. But then $T^na$ $\in$ $\mathfrak{q} \cap R$, contradiction. This shows that $\mathrm{spec}(D_0)$ is at most countable.
Note that for $z \in \mathbb{Q}$, the ideal $\mathfrak{p}_z := \sum_{i \in \mathbb{N}} (X_i  z^{2^{i1}}T)\cdot D_0$ is a height 1 prime ideal of $D_0$. If $z_1 \ne z_2$ and $\mathfrak{p}_{z_1}$ = $\mathfrak{p}_{z_2}$, then $X_1z_1T$ and $X_1z_2T$ are in this ideal, hence so is $T$, contradiction. Hence $\mathrm{spec}(D_0)$, and therefore also $\mathrm{spec}(D)$, is indeed a countably infinite set.
And if $a \ne 0$ is in all height 1 primes of $D_0$ contained in $\mathfrak{m}$, then, for a suitable $n \in \mathbb{N}$, the nonzero element $T^na$ is in $R$ and in infinitely many prime ideals of $R$, another contradiction.