2016-02-07 0:30 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
> > 2016-01-27 13:26 GMT+01:00 Andres Freund <andres@anarazel.de>:
> >> What exactly does your extension do? And where did you add that null
> check?
>
> > this extension does some log preprocessing for syslog
> > extension and fix attached
>
> That extension is broken on its face. You cannot have an emit_log_hook
> that does catalog access, because elog() can be called outside a
> transaction or in an already-failed transaction. Whatever band-aids
> you put around that will just be band-aids that will fail regularly.
> You need to move the catalog lookup someplace else. (Actually, I wonder
> why you're doing a catalog lookup at all ... wouldn't it be sufficient to
> do a DirectFunctionCall to inet_out?)
>
yes - the design was unlucky - and I fixed it without the necessity to
touch system catalogue there.
The interesting on this issue is fact, so this extension in form, that I
sent (badly designed) worked without any problems on 9.1, and 9.2 and
failing with low probability on 9.4, 9.5.
Regards
Pavel
>
> I doubt this has much to do with the OP's issue.
>
> regards, tom lane
>