Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> It seems that there is enough need for this feature, that it has been
> implemented multiple times -- but most of them will fail in corner
> cases. Seems an obvious candidate for an in-core function ...
... which will still fail in corner cases. Not to mention the race
condition when the logger has just/is about to switch.
regards, tom lane