4. Let prime numbers $a, b$ satisfy $a^{2}-9 b-4=0$. Then the median of the data $a, b, 2, 3$ is ().
(A) 4
(B) 7
(C) 4 or 7
(D) 4.5 or 6.5
4. C.

From $(a+2)(a-2)=9 b$ (where $a$ and $b$ are prime numbers), we know that $(a+2, a-2)$ $=(9, b)$ or $(b, 9)$ or $(9 b, 1)$ or $(3 b, 3)$.
Solving, we get $(a, b)=(7,5)$ or $(11,13)$.
Therefore, the median of $2, 3, 5, 7$ is $4$; the median of $2, 3, 11, 13$ is $7$.