From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | Andrew Chernow <ac(at)esilo(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Error in PQsetvalue |
Date: | 2011-07-18 10:24:49 |
Message-ID: | 9010377964.20110718132449@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello, Andrew.
I hope you don't mind I've added this patch to CommitFest:
https://commitfest.postgresql.org/action/patch_view?id=606
You wrote:
AC> On 6/3/2011 10:26 PM, Andrew Chernow wrote:
>>
>>>> I disagree -- I think the fix is a one-liner. line 446:
>>>> if (tup_num == res->ntups&& !res->tuples[tup_num])
>>>>
>>>> should just become
>>>> if (tup_num == res->ntups)
>>>>
>>>> also the memset of the tuple slots when the slot array is expanded can
>>>> be removed. (in addition, the array tuple array expansion should
>>>> really be abstracted, but that isn't strictly necessary here).
>>>>
>>>
>>> All true. This is a cleaner fix to something that was in fact broken ;) You want
>>
>> Attached a patch that fixes the OP's issue. PQsetvalue now uses pqAddTuple to
>> grow the tuple table and has removed the remnants of an older idea that caused
>> the bug.
>>
AC> Sorry, I attached the wrong patch. Here is the correct one.
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Golub | 2011-07-18 10:38:37 | Re: fixing PQsetvalue() |
Previous Message | Simon Riggs | 2011-07-18 07:33:58 | Re: Reduced power consumption in WAL Writer process |