On Fri, Aug 22, 2014 at 2:46 PM, Peter Geoghegan <pg@heroku.com> wrote:
> On Fri, Aug 22, 2014 at 7:19 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> Patch 0002 no longer applies; please rebase.
>
> I attach rebased patch.
>
> Note that there is currently a bug in the master branch:
>
> + if (len2 >= tss->buflen2)
> + {
> + pfree(tss->buf2);
> + tss->buflen1 = Max(len2 + 1, Min(tss->buflen2 * 2, MaxAllocSize));
> + tss->buf2 = MemoryContextAlloc(ssup->ssup_cxt, tss->buflen2);
> + }
You didn't say what the bug is; after inspection, I believe it's that
line 4 begins with tss->buflen1 rather than tss->buflen2.
I have committed a fix for that problem. Let me know if I missed
something else.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company