Eliminating residual gauge in BRST quantization of Yang-Mills theory I would like to know if there is a procedure to completely fix a gauge, which I believe we must do in order to make sense of the path integral?
In chapter 74 Sredniki introduces the Lagrangian
$$
\mathcal{L} = \mathcal{L}_{YM} + \delta_B \mathcal{O}\ .\tag{74.17}
$$
The operator $\mathcal{O}$ has to be Grassmann-odd, therefore (I believe) it is sometimes referred to as the gauge-fixing-fermion.
Sredniki proceeds to make the choice
$$
\mathcal{O} = Tr\left[\bar{c}\left(\frac{\xi}{2}B - G\right) \right] \ .\tag{74.18}
$$
It is clear to me that by making the choice $$G = \partial_\mu A^\mu\tag{74.19}$$ we obtain the ghost Lagrangian and gauge-fixing terms in $R_\xi$ gauge. I would like to know why is $\mathcal{O}$ chosen in such a way? It appears like any Grassmann-odd function would work, and this choice is made simply to give an easy realization of $R_\xi$ gauge and the Faddeev-Popov delta function.
Let us suppose we picked some form for $\mathcal{O}$. How do we ensure that this gauge fixing condition has no residual gauge freedom? To consider a simple example, Lorenz gauge has the residual gauge freedom
$$
A_\mu \rightarrow A_\mu + \partial_\mu \Lambda
$$
where $\square\Lambda=0$. How would I eliminate this freedom? And, what most interests me, how do we do this for general gauge choices? I suppose that we would require the gauge-fixing function to fix a gauge such that "the solutions to $G=0$ are unique". Is there a useful way of encoding this as constraints on the form of $\mathcal{O}$ or $G$? Just fixing a gauge and then guessing additional gauge transformations seems a bit unsystematic, since I would not know what forms of gauge transformations I should be guessing.
 A: *

*Why the path integral needs gauge-fixing is e.g. discussed in this, this, this & this Phys.SE posts.

*The currently most general quantization scheme is Batalin-Vilkovisky (BV) quantization. Within the BV formalism the gauge-fixing fermion is more or less arbitrary as long as it is Grassmann-odd, a Lorentz scalar, has ghost number -1, and certain rank conditions are met. The gauge-fixing fermion that OP mentions is a convenient choice that leads to the popular $R_{\xi}$ gauge. See also this & this related Phys.SE posts. 

*OP is right that the Lorenz gauge leaves a longitudinal residual gauge symmetry. This means that the Hessian of the gauge-fixed action is strictly speaking still degenerate, and the propagator will have a $1/k^2$-pole in $k$-space. However this pole is not just a gauge artifact: The pole has a physical significance as well: It corresponds to a physical photon with transverse polarizations going on-shell. The long story short is that the residual gauge symmetry does not obstruct perturbative QFT calculations. 
It is also telling that the residual gauge symmetry disappears when we Wick-rotate to the Euclidean formulation. According to common physics lore  we should be able to Wick rotate the path integral, so we can evidently get away with not moding out the residual gauge symmetry.
More generally, it is tempting to conjecture that residual gauge symmetry that hides inside physical poles are tolerable. 
References:


*

*I.A. Batalin & G.A. Vilkovisky, Gauge Algebra and Quantization, Phys. Lett. B 102 (1981) 27–31.

*M. Henneaux and C. Teitelboim, Quantization of Gauge Systems, 1994.

*M. Henneaux, Lectures on the antifield-BRST formalism for gauge theories, Nucl. Phys. B  Proc. Suppl. 18 (1990) 47.
