Re: "snapshot too large" error when initializing logical replication (9.4)

From: Steve Singer <steve(at)ssinger(dot)info>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "snapshot too large" error when initializing logical replication (9.4)
Date: 2014-10-31 02:41:13
Message-ID: BLU436-SMTP64F8D0B36330A82BA47D86DC9A0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/28/2014 01:27 PM, Andres Freund wrote:
> Hi,
>
> On 2014-10-25 18:09:36 -0400, Steve Singer wrote:
>> I sometimes get the error "snapshot too large" from my logical replication
>> walsender process when in response to a CREATE_REPLICATION_SLOT.
> Yes. That's possible if 'too much' was going on until a consistent point
> was reached. I think we can just use a much larger size for the array
> if necessary.
>
> I've attached patch for this. Could you try whether that helps? I don't
> have a testcase handy that reproduces the problem.

This patch seems to fix things.
I've done numerous runs of the test with I was doing before with your
patch applied and don't seem to be having this issue anymore.

>> This is in SnapBuildExportSnapshot in snapbuild.c
>>
>> newxcnt is 212 at that point
>>
>> I have max_connections = 200
>>
>> procArray->maxProcs=212
>>
>> Should we be testing
>> newxcnt > GetMaxSnapshotXidCount()
>>
>> instead of
>> newxcnt >= GetMaxSnapshotXidCount()
> It actually looks correct to me new - newxcnt is used as an offset into
> an array of size GetMaxSnapshotXidCount().
>
> Greetings,
>
> Andres Freund
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-10-31 02:49:33 Re: TAP test breakage on MacOS X
Previous Message Andrew Dunstan 2014-10-31 02:29:32 Re: TAP test breakage on MacOS X