Re: seg fault crashed the postmaster - Mailing list pgsql-general

From Tom Lane
Subject Re: seg fault crashed the postmaster
Date
Msg-id 6829.1293832143@sss.pgh.pa.us
Whole thread Raw
In response to Re: seg fault crashed the postmaster  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: seg fault crashed the postmaster  (Gordon Shannon <gordo169@gmail.com>)
List pgsql-general
I wrote:
> The odds seem pretty good that the "corrupt compressed data" message
> has the same origin at bottom, although the lack of any obvious data
> to be compressed in this table is confusing.  Maybe you could get that
> from trying to copy over a garbage value of that one varchar column,
> though.

Nah, that's overthinking the problem.  Just before the previously
identified crash point, we have

            td = DatumGetHeapTupleHeader(datum);

That's a pg_detoast_datum call underneath the macro.  So if you assume
that the tuple-datum pointer is pointing at garbage, you can get all
three of the observed symptoms very easily, depending on what the
garbage passing for its length word happens to look like.

So I'm pretty sure that what we're dealing with is a case of the plan
freeing a transient tuple datum sooner than it should.  But the toy case
I tried here didn't fail, so evidently I'm not close enough to the plan
you're actually using.  Still need to see that EXPLAIN output.  It'd be
helpful also to know what nondefault configuration settings you're
using, especially work_mem and planner-related settings.  Also, do you
have an idea of how many rows might've matched the WHERE conditions?

            regards, tom lane

pgsql-general by date:

Previous
From: Gordon Shannon
Date:
Subject: Re: seg fault crashed the postmaster
Next
From: Gordon Shannon
Date:
Subject: Re: seg fault crashed the postmaster