From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Dmitriy Sarafannikov <dimon99901@mail.ru>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: Re[2]: [BUGS] Segfault in MemoryContextAlloc
Date: Sat, 06 Feb 2016 18:30:20 -0500
Message-ID: <31289.1454801420@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRBiU5ErMWM-SzSC1gRY3jZ=0z9jcdOv2Jk-Wge6z+3X5g@mail.gmail.com>
References: <1453890275.241158212@f404.i.mail.ru>
<20160127103533.GA17919@awork2.anarazel.de>
<1453891638.831641165@f352.i.mail.ru>
<CAFj8pRBMFhMEA9x3PAURcyU68naU0fD9rOdK8708xWzQtDLWAA@mail.gmail.com>
<8F98BBF2-97FA-42D5-BD47-2EA050657773@anarazel.de>
<CAFj8pRBiU5ErMWM-SzSC1gRY3jZ=0z9jcdOv2Jk-Wge6z+3X5g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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?)
I doubt this has much to do with the OP's issue.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, andres@anarazel.de, dimon99901@mail.ru
Subject: Re: [BUGS] Segfault in MemoryContextAlloc
In-Reply-To: <31289.1454801420@sss.pgh.pa.us>
References: <1453890275.241158212@f404.i.mail.ru> <20160127103533.GA17919@awork2.anarazel.de> <1453891638.831641165@f352.i.mail.ru> <CAFj8pRBMFhMEA9x3PAURcyU68naU0fD9rOdK8708xWzQtDLWAA@mail.gmail.com> <8F98BBF2-97FA-42D5-BD47-2EA050657773@anarazel.de> <CAFj8pRBiU5ErMWM-SzSC1gRY3jZ=0z9jcdOv2Jk-Wge6z+3X5g@mail.gmail.com> <31289.1454801420@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox