Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> I gather that this is supposed to be back-patched to all supported
> branches.
FWIW, I don't like that patch any better than Robert does. It seems
as likely to do harm as good. If there are places where libpq itself
is leaving entries on the error stack, we should fix them -- retail.
But it's not our business to clobber global state because there might
be bugs in some other part of an application.
regards, tom lane