2. The inequality $x^{2}+|2 x-6| \geqslant a$ holds for all real numbers $x$. Then the maximum value of the real number $a$ is $\qquad$
2.5.

When $x \geqslant 3$,
left side $=x^{2}+2 x-6=(x+1)^{2}-7 \geqslant 9$;
When $x<3$,
left side $=x^{2}-2 x+6=(x-1)^{2}+5 \geqslant 5$.
Therefore, for the given inequality to hold for all real numbers $x$, the maximum value of $a$ should be 5.