4. Let $x_{1}, x_{2}$ be the integer solutions of the equation $x^{2} + p x + 3 q = 0$ with prime numbers $p$ and $q$. Then, by Vieta's theorem,

$$
x_{1} + x_{2} = -p
$$

From this, we conclude that both roots must be negative. Further, since the roots are integers and the numbers $q, 3$ are prime, there are only two possible cases:

$$
x_{1} = -1, x_{2} = -3 q \text{ or } x_{1} = -3, x_{2} = -q.
$$

Consider the first case. If $x_{1} = -1, x_{2} = -3 q$, then $1 + 3 q = p$. Thus, $p$ and $q$ have different parities. The only even prime number is 2. If $p = 2$, then the equation $1 + 3 q = 2$ has no solution in prime numbers, so this case is impossible. If $p$ is odd, then $q$ is even. The only possible value is $q = 2$. In this case, $p = 1 + 2 \cdot 3 = 7$ is a prime number. We have the solution $p = 7, q = 2$. In this case, $x_{1} = -1, x_{2} = -6$.

Consider the second case. If $x_{1} = -3, x_{2} = -q$, then $3 + q = p$. Again, $p$ and $q$ have different parities. If $p = 2$, then the equation $3 + q = 2$ has no solution in prime numbers, so this case is impossible. If $p$ is odd, then $q$ is even. For $q = 2$, $p = 3 + 2 = 5$ is a prime number. We have another solution $p = 5, q = 2$. In this case, $x_{1} = -3, x_{2} = -2$.

We have considered all possible cases. There are no other solutions.
Answer: there are two pairs of solutions: $p=5, q=2 ; p=7, q=2$.