Holonomy of a Ricci-flat affine connection There is some link between Ricci-flatness and reduction of holonomy. For example a Kahler manifold is Ricci-flat if and only if it has at most $SU(n)$ holonomy rather than $U(n)$, and it's apparently open to construct a closed, simply-connected Ricci-flat manifold with full $SO(n)$ holonomy. 
On a manifold with an arbitrary affine connection, the Ricci curvature still makes sense. By any chance, does being Ricci-flat imply a reduction of the holonomy? In particular, does it imply that the connection is compatible with some (pseudo-Riemannian) metric (i.e. that the holonomy is contained in some $O(p,q)$)? I'm happy to assume the connection is torsion-free. And I'm really most interested in the local holonomy, so assume the manifold is simply-connected if that makes a difference.
(The motivation for this question comes from thinking very naively about general relativity as a pure gauge theory, which I think makes sense in a vacuum at least. Maybe in this case the metric constraint comes for free!)
 A: The answer depends on the dimension.  When $n=2$, Ricci-flatness of a connection implies that it is flat, so, in that case, yes, you get holonomy reduction locally.  However, when $n>2$, Ricci-flatness of a torsion-free connection only implies that the (local) holonomy lies in $\mathrm{SL}(n,\mathbb{R})$.  You do not generally get any further reduction than that.
Remark 1:
While writing down the general torsion-free connection with vanishing Ricci tensor and holonomy $\mathrm{SL}(n,\mathbb{R})$ (for $n>2$) does not appear to be easy, 
it is not hard to construct specific examples:  Let $M=\mathbb{R}^n$ have its standard coordinates $x^1,\ldots,x^n$ and, for notational simplicity, assume that the indices are taken modulo $n$, i.e., we have $x^{n+1} = x^1,\ x^{-1} = x^{n-1}$, etc..  Let $E_i$ be the standard coordinate vector fields on $\mathbb{R}^n$ and consider the connection $\nabla$ defined by setting
$$
\nabla_{E_i} E_i = E_{i-1}\qquad\text{while}\qquad
\nabla_{E_i} E_j = 0\qquad \text{when $i\not\equiv j\mod n$}.
$$
Then $\nabla$ is torsion-free and its curvature tensor is
$$
R^\nabla = \sum_{i=1}^n\ E_{i-1}\otimes \mathrm{d}x^{i+1}\otimes
           \bigl(\mathrm{d}x^{i}\wedge\mathrm{d}x^{i+1}\bigr).
$$
Since $n>2$, one has $\mathrm{Ric}(\nabla) = 0$.  The image of the curvature operator in $TM\otimes T^*M$ is spanned by the (nilpotent) linear transformations
$$
N_i = E_{i-1}\otimes \mathrm{d}x^{i+1},
$$
and these span an $n$-dimensional subbundle of $\mathrm{End}(TM)$ whose iterated commutators span the entire Lie algebra ${\frak{sl}}(n,\mathbb{R})$ at every
point.  Thus, by the Ambrose-Singer Holonomy Theorem, the holonomy of $\nabla$ is $\mathrm{SL}(n,\mathbb{R})$.
Note that $\nabla$ is translation-invariant, so it is well-defined on the quotient 
$\mathbb{T}^n = \mathbb{R}^n/\mathbb{Z}^n$, a compact torus. Thus, compactness does not obstruct the existence of a Ricci-flat torsion-free connection with full holonomy $\mathrm{SL}(n,\mathbb{R})$.
A: By a Theorem of Hano-Ozeki (see here http://projecteuclid.org/download/pdf_1/euclid.nmj/1118799772) any connected Lie subgroup $G$ of $GL(n,\mathbb{R})$ can be realized as the holonomy group of an affine connection in an $n$-dimensional manifold ($n>1$). Take $G = SL(n,\mathbb{R})$ and apply Hano-Ozeki to get a connection whose holonomy is $SL(n,\mathbb{R})$. Now by the Holonomy theorem (e.g. Theorem 9.1., page 151 Kobayashi-Nomizu Vol I) the curvature tensor $R$ belongs to the Lie algebra of $SL(n,\mathbb{R})$ hence $trace(R) = 0$ (i.e. the connection is Ricci-flat). Finally it is not difficult to see that $SL(n,\mathbb{R})$ is not contained in any $O(p,q)$, $(p+q = n)$ hence there are no compatible pseudo-Riemannian metric.
