Re: crash while decoding INSERT ON CONFLICT

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Euler Taveira <euler(at)timbira(dot)com(dot)br>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: crash while decoding INSERT ON CONFLICT
Date: 2018-05-21 17:59:42
Message-ID: CAH2-Wzmwq727DLL-k9oPRSGHXOfhHpG3oc3acUi95zJ7-J9hzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, May 21, 2018 at 8:52 AM, Euler Taveira <euler(at)timbira(dot)com(dot)br> wrote:
> If my math is correct the lsn 6211559254952 is 5A6/3DC86BA8. The transaction is:

Are you sure you're not missing some earlier records for this xact? I
see a HEAP_CONFIRM record without any preceding HEAP_INSERT. This
doesn't make any sense, though I half-suspect that that's the actual
problem: we have a HEAP_CONFIRM without anything to confirm. (I
actually doubt that you omitted WAL records, but I must still ask if
it's a simple mistake, just to be sure.)

If you really do have all the records for the xact whose commit record
is at 5A6/3DC86BA8, then the immediate problem is obvious: control
flow within ReorderBufferCommit() expects to have found a specinsert
that corresponds to a HEAP_CONFIRM or
REORDER_BUFFER_CHANGE_INTERNAL_SPEC_CONFIRM, but that assumption has
somehow been violated -- specInsert is still NULL, leading to a
segfault. I have no idea why that should be right now; that's just
what it looks like on the face of it.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira 2018-05-21 18:04:28 Re: crash while decoding INSERT ON CONFLICT
Previous Message Andres Freund 2018-05-21 16:54:15 Re: crash while decoding INSERT ON CONFLICT