Let $X=\{0,1\}^{\mathbb{N}}$ and $\theta$ be the partition of $X$ induced by the equivalence relation $x \sim x'$ when $x$ and $x'$ differ only at a finite number of coordinates (see [this related question](https://mathoverflow.net/questions/96023/intersection-partition-as-an-orbital-partition)).


Given a Bernoulli measure $m$ on $X$, let ${\cal H}$ be the group of transformations $S$ of $X$ satisfying $\theta(x)=\theta(S(x))$ for almost all $x$ and let ${\cal G}$ be the subgroup of ${\cal H}$ consisting of measure-preserving transformations.


Is it possible to explicitely describe ${\cal G}$ ? Under which condition on $m$ the group ${\cal G}$ is ergodic ?


EDIT: I am also interested in the case when $m$ is a stationnary Markov probability on $X$.



ergodicity of the group of transformations preserving a partition
It's easy to see that the action is always ergodic since $\mathcal G$ contains the group of finite permutations on the indices, which acts ergodically. In fact, the group $\mathcal G$ (which equals $\mathcal H$ in the case $m = \mu^{\mathbb N}$ with $\mu(0) = 1/2$.) that you are describing is the full group of the ergodic hyperfinite measurable equivalence relation. It, and other full groups are discussed in Sections I.3 and I.4 in the book by Alexander Kechris: Global aspects of ergodic group actions, Mathematical Surveys and Monographs, 160, American Mathematical Society, 2010. 


