How do I check in practice if a posterior is proper? I know that improper priors sometimes lead to improper posteriors and that I shouldn't be doing inference with an improper posterior. But short of computing
$$
\int \pi(\theta\mid x)\,\text d\theta
$$
what's a principled way to check if I've accidentally chosen improper priors that led to an improper posterior? Can I do this with just my posterior samples when I don't even know the functional form of $\pi(\theta\mid x)$?
 A: The fundamental issue with improper posteriors $\mu$ is that Markov chains associated with them are either transient (reaching almost surely and definitely some infinite region of the state space) or null recurrent (revisiting past places but in an infinite time). In the later case, there is a form of ergodic theorem, namely that for $g,h\in\mathcal L¹(\mu)$,
$$\dfrac{\sum_{t=1}^T g(\theta^t)}{\sum_{t=1}^T h(\theta^t)}\longrightarrow\dfrac{\int g(\theta)\,\text{d}\mu(\theta)}{\int h(\theta)\,\text{d}\mu(\theta)}$$
which means that some form of stability occurs and in consequence turns detection of infinite mass difficult, especially when the improper nature of the posterior occurs near a finite boundary. This happened for instance for an ANOVA model analysed in one of the first Gibbs sampling papers in 1990, namely that the Gibbs sampler did not produce detectable signals of the issue ...
Here is a toy example based on the improper target $\mu(\theta)=e^{-\theta}/\theta$ over $\Bbb R^*_+$:
       targ=function(x) ifelse(x>0,1/x/exp(x),0)
       T=1e6
       mark=rep(1,T)
       for (t in 2:T){
        prop=rnorm(1,mark[t-1],.1)
        mark[t]=ifelse(runif(1)<targ(prop)/targ(mark[t- 
                  1]),prop,mark[t-1])}

with an output that looks not that great but still moving around:

