I need help some help with problem 2.2.3 from Einsiedler's Ergodic Theory: with a view towards Number Theory. The first part of the problem is to show that if $(X,d)$ is a compact metric space, if $\mu$ is a probability measure defined on the Borel subsets of $X$ and if $T:X\to X$ is a continuous transformation, then for $\mu$-almost every $x\in X$ there exists a strictly increasing sequence $(n_k)_{k\in\mathbb{N}}$ such that $$\lim_{k\to\infty} T^{n_k}(x)=x.$$ The second part is to show that the conclusion still holds if we let $X$ be an arbitrary metric space and $T:X\to X$ an arbitrary measure-preserving transformation. I have been able to show that the conclusion holds for a compact metric space $X$ and an arbitrary measure-preserving transformation $T$, but I don't know how to get rid of the compactness of $X$. Could any of you help me?
Here is (a sketch of) my solution for a compact space $X$ and an arbitrary measure-preserving transformation $T$: For each $n$, use the compactness of $X$ to find a finite set $X_0\subseteq X$ so that $X=\bigcup_{x\in X_0}B(x,1/n)$. Then, use Poincaré's recurrence theorem to pick a set $E_n$ such that $\mu(E_n)=0$ and $E_n$ contains all points $y\in X$ for which there is an $x\in X_0$ so that $y\in B(x,1/n)$ and $y$ does not return infinitely often to $B(x,1/n)$ under positive iteration by $T$. Set $E=\bigcup_{n\in\mathbb{N}}E_n$. It is clear that $\mu(E)=0$, and it is easy to check that if $y\notin E$, then we can pick a strictly increasing sequence $(n_k)_{k\in\mathbb{N}}$ such that $\lim_{k\to\infty}T^{n_k}(y)=y$. This finishes the proof.