Suppose $x\mid\theta \sim \operatorname{Gamma}(\frac{n}{2},2\theta)$ and $\theta \sim$ inverse Gamma$(\alpha, \beta)$
with loss function $L(\theta, d)=\frac{(\theta-d)^2}{\theta^2}$
We wish to find the Bayes estimator, ie the estimator minimizing posterior expected loss. If it was square error loss, then it would simply be the posterior mean. But since not, we must minimize the estimator with respect to the expected posterior loss.
Issues occur in that there is no obvious distribution for the posterior or way to evaluate the integrals.
The question appeared on a past exam. User Xi'an left the very interesting note that we could transfer the denominator of the loss function to our prior and then we would have the standard square error loss. In that case it would be a matter of finding the mean of the resulting posterior distribution. But I am seeing slightly different answers, as well as the answer I was given was the quotient of two non standard integrals and involved differentiating under the integral sign.
self-study
tag to your question. Adding $\theta^{-2}$ to the quadratic loss is equivalent to adding $\theta^{-2}$ to the prior: switch to an Inverse Gamma with parameter $\alpha+2$ instead and use the posterior mean. $\endgroup$