To give another view than that of Digio, I have actually only encountered the requirement for a finite second moment¹, and not for a constant one; at least in books and academic papers, as opposed to online resources (presentations, blogposts, etc.).
I thus believe the formal definition for a weak (or wide-sense) stationary process is:
- The first moment of $x_i$ is constant; i.e. $∀t, E[x_i]=𝜇$
- The second moment of $x_i$ is finite for all $t$; i.e. $∀t, E[x_i²]<∞$ (which also implies of course $E[(x_i-𝜇)²]<∞$; i.e. that variance is finite for all $t$)
- The cross moment ― i.e. the auto-covariance ― depends only on the difference $u-v$; i.e. $∀u,v,\tau, cov(x_u, x_v)=cov(x_{u+\tau}, x_{v+\tau})$
However, I believe that the apparent confusion between the two conditions, and the fact that in some places a requirement for constant variance is stated instead of a finite one, is due to the fact that this indeed follows directly from the three conditions above.
The third condition implies that every lag $\tau \in \mathbb{N}$ has a constant covariance value associated with it:
$$cov(X_{t_1}, X_{t_2}) = K_{XX}(t_1,t_2) = K_{XX}(t_2-t_1,0) = K_{XX}(\tau)$$
Note that this directly implies that the variance of the process is also constant, since we get that for all $t \in \mathbb{N}$
$$ Var(X_t) = cov(X_t, X_t) = K_{XX}(t,t) = K_{XX}(0) = d$$
for some constant $d$.
1 When writing second moment I mean $E[x_i^2]$, and not variance, which is the second central moment.