Re: logical decoding bug: segfault in ReorderBufferToastReplace()

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Schneider (AWS), Jeremy" <schnjere(at)amazon(dot)com>
Subject: Re: logical decoding bug: segfault in ReorderBufferToastReplace()
Date: 2021-06-05 04:44:42
Message-ID: CAFiTN-vSHa5w0g6YjYjP=q0ZkqgVGwZ2ksCmsSXZqzAKNYpyww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-committers pgsql-hackers

On Sat, Jun 5, 2021 at 5:41 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> > This indicates that a toast record was present for that relation,
> > despite:
>
> Can you explain what it is you saw that indicates that a toast record
> was present for the relation? I may be misreading the code, but there's
> nothing obvious that says that if we reach there, then a toast datum
> exists anywhere for this relation. We only know that txn->toast_hash is
> set, but that could be because the transaction touched a toast record in
> some other table. Right?

Is this problem is related to the thread [1], where due to spec abort
the toast hash was not deleted and after that, if the next record is
for some other relation which is not having a toast table you will see
this error. There are a few other problems if the toast hash is not
cleaned due to spec abort. I have submitted patches with 2 approached
in that thread.

[1] https://www.postgresql.org/message-id/CAFiTN-szfpMXF2H%2Bmk3m_9AB610v103NTv7Z1E8uDBr9iQg1gg%40mail.gmail.com

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2021-06-05 06:42:49 Re: logical decoding bug: segfault in ReorderBufferToastReplace()
Previous Message Tom Lane 2021-06-05 00:21:22 Re: BUG #17048: about trace_locks parameter problem

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2021-06-05 05:26:23 pgsql: Fix subtransaction test for Python 3.10
Previous Message Tom Lane 2021-06-05 00:07:14 pgsql: Fix postgres_fdw failure with whole-row Vars of type RECORD.

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-06-05 05:29:16 Re: Python 3.10 breaks regression tests with traceback changes
Previous Message David Rowley 2021-06-05 04:33:23 Fix a few typos in brin_minmax_multi.c