Re: crash while decoding INSERT ON CONFLICT - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: crash while decoding INSERT ON CONFLICT
Date
Msg-id CAH2-Wzmwq727DLL-k9oPRSGHXOfhHpG3oc3acUi95zJ7-J9hzA@mail.gmail.com
Whole thread Raw
In response to crash while decoding INSERT ON CONFLICT  (Euler Taveira <euler@timbira.com.br>)
Responses Re: crash while decoding INSERT ON CONFLICT
List pgsql-bugs
On Mon, May 21, 2018 at 8:52 AM, Euler Taveira <euler@timbira.com.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


pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: crash while decoding INSERT ON CONFLICT
Next
From: Euler Taveira
Date:
Subject: Re: crash while decoding INSERT ON CONFLICT