Re: [sqlsmith] crashes in RestoreSnapshot on hot standby - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [sqlsmith] crashes in RestoreSnapshot on hot standby
Date
Msg-id CA+TgmoZM-vbKzhz--kigdvv1FKx5ZQzq-LCjW5iXdHE3o58ysw@mail.gmail.com
Whole thread Raw
In response to Re: [sqlsmith] crashes in RestoreSnapshot on hot standby  (Andreas Seltenreich <seltenreich@gmx.de>)
List pgsql-hackers
On Fri, Jul 1, 2016 at 1:41 AM, Andreas Seltenreich <seltenreich@gmx.de> wrote:
> Amit Kapila writes:
>> On Fri, Jul 1, 2016 at 9:38 AM, Thomas Munro <thomas.munro@enterprisedb.com> wrote:
>>> Or maybe just like this?
>>>
>>> -               snapshot->subxip = snapshot->xip + serialized_snapshot->xcnt;
>>> +               snapshot->subxip = ((TransactionId *) (snapshot + 1)) +
>>> +                       serialized_snapshot->xcnt;
>>>
>>
>> This way it looks better to me.  Thanks for the patch.
>
> I no longer see these crashes when testing with the patch applied.

Committed and back-patched to 9.5 where this code was added.  Thanks
to all for the report, patch, review, and testing.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Next
From: Robert Haas
Date:
Subject: Re: Broken handling of lwlocknames.h