From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Sudalai <sudalait2@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: Segmentation Fault in logical decoding get/peek API
Date: Wed, 21 Feb 2018 15:31:04 +0100
Message-ID: <9fe0a6de-d204-9067-4eba-dd686077dd89@2ndquadrant.com> (raw)
In-Reply-To: <1519197538224-0.post@n3.nabble.com>
References: <1519042814659-0.post@n3.nabble.com>
<20180220175530.6ib4b3ngzkipekgs@alap3.anarazel.de>
<d1354af3-d34a-75a2-a171-3ac981bce639@2ndquadrant.com>
<CAH2-WzkXxqtEH8CpUrpSewFfiZFqyjrhjQ1nLeYb_n-kR_uU0Q@mail.gmail.com>
<1519197538224-0.post@n3.nabble.com>
On 02/21/2018 08:18 AM, Sudalai wrote:
>
>
>>> And if it's segfaulting, it has to mean specinsert is NULL. So either we
>>> never got REORDER_BUFFER_CHANGE_INTERNAL_SPEC_INSERT, or we threw it
>>> away in the "change_done" part. Seems strange in both cases.
>
> Yes, specinsert is NULL.
>
>>> Sudalai, are you using speculative inserts in the transaction?
> Yes . We have done ON CONFLICT DO NOTHING .
>
>
> Is it correct to add below check ,
> if(specinsert == NULL ){
> goto change_done;
> }
> before , Assert(specinsert->data.tp.oldtuple == NULL); to fix segfault ?
>
That seems unlikely to fix the root cause - more likely it's going to
mask it in some strange way. We need to understand why it does happen
(i.e. specinsert is not expected to be NULL here).
It would really help if you could provide a self-contained test case
demonstrating the issue, as mentioned by Andres.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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: tomas.vondra@2ndquadrant.com, sudalait2@gmail.com
Subject: Re: Segmentation Fault in logical decoding get/peek API
In-Reply-To: <9fe0a6de-d204-9067-4eba-dd686077dd89@2ndquadrant.com>
References: <1519042814659-0.post@n3.nabble.com> <20180220175530.6ib4b3ngzkipekgs@alap3.anarazel.de> <d1354af3-d34a-75a2-a171-3ac981bce639@2ndquadrant.com> <CAH2-WzkXxqtEH8CpUrpSewFfiZFqyjrhjQ1nLeYb_n-kR_uU0Q@mail.gmail.com> <1519197538224-0.post@n3.nabble.com> <9fe0a6de-d204-9067-4eba-dd686077dd89@2ndquadrant.com>
* 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