Re: BUG #14295: Hot standby crash during tsvector rebuild - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #14295: Hot standby crash during tsvector rebuild
Date
Msg-id 8020.1472916375@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #14295: Hot standby crash during tsvector rebuild  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #14295: Hot standby crash during tsvector rebuild  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I wrote:
> Spencer Thomason <spencer@whiteskycommunications.com> writes:
>> Also, I should note that this is on a SPARC T2 at 1.4GHz so the single thread performance might be a factor as well.

> Am I right in thinking that is a 32-bit machine?  That might have
> something to do with it (notably because of different maxalign).

Awhile later it occurred to me that SPARCs are generally big-endian,
which led me to try your example on an old HPPA box, and kaboom!
I've now traced it to this bit in gindatapage.c:

    int            nmodifieditems;

    ...

                memcpy(walbufend, &seginfo->nmodifieditems, sizeof(uint16));

which of course works fine on little-endian hardware and not at all on
big-endian.  There might be more bugs (takes a while to run your example
on that old dinosaur :-() but this one is sufficient to explain the
known symptoms.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #14295: Hot standby crash during tsvector rebuild
Next
From: Spencer Thomason
Date:
Subject: Re: BUG #14295: Hot standby crash during tsvector rebuild