Let $M$ be an $n$-dimensional smooth manifold and $\Theta$ some tensor field on $M$, so a smooth section of $TM^{\otimes r} \otimes T^*M^{\otimes s}$ for some $(r,s)$. Let $\mathfrak{g}_\Theta$ denote the Lie subalgebra of vector fields which leave $\Theta$ invariant: $$ \mathfrak{g}_\Theta = \{ X \in \mathcal{X}(M) \mid \mathcal{L}_X \Theta = 0 \} $$
If $\Theta = g$, a pseudo-riemannian metric, then it is well-known that $\mathfrak{g}_\Theta$ is finite-dimensional, with dimension bounded above by $n(n+1)/2$. On the other hand if $\Theta = \omega$, a symplectic structure, then it is again well known that $\mathfrak{g}_\Theta$ is infinite-dimensional, since it contains the hamiltonian vector fields.
I expect it is not easy, given $\Theta$, to determine whether $\mathfrak{g}_\Theta$ is finite- or infinite-dimensional, but I thought I'd ask here.
I'm actually interested in knowing what the generic case is.
I know from examples that if we allow a metric to become degenerate, then the "isometry" Lie algebra becomes infinite-dimensional. But on the other hand, a random metric need not have any isometries at all. Hence I am not sure which way to bet.
Any comments would be appreciated.