Re: The connection to the server was lost. Attempting reset: Failed.

From: Yessica Brinkmann <yessica(dot)brinkmann(at)gmail(dot)com>
To: Jaime Soler <jaime(dot)soler(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: The connection to the server was lost. Attempting reset: Failed.
Date: 2019-10-10 18:35:00
Message-ID: CABrYqSNQ508aeHri0kArE9MLR86ix5or2sqYiOfWZt2_pSnWUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you so much for your answer. I will be testing the indicated and then
I give you return.
Best regards,
Yessica Brinkmann

El jue., 10 oct. 2019 a las 15:25, Jaime Soler (<jaime(dot)soler(at)gmail(dot)com>)
escribió:

> Why don't have a try to gdb ?
> https://wiki.postgresql.org/wiki/Developer_FAQ#What_debugging_features_are_available.3F
>
> It might be a extra free memory executions or null pointer accesses .. ,
> gdb could help you.
>
> Regards
>
> El jue., 10 oct. 2019 a las 20:01, Yessica Brinkmann (<
> yessica(dot)brinkmann(at)gmail(dot)com>) escribió:
>
>> Thank you very much for the reply.
>> Well, really, resetStringInfo () is a function of the StringInfo data
>> structure.
>> What I used at the end was initStringInfo, which is a function of the
>> data structure StringInfoData, which is what I am using, although I don't
>> know if they are equivalent.
>> The code remained as follows:
>> if (cols.len> 0)
>> {
>> initStringInfo (& cols);
>> } / * IF col.len> 0 * /
>> But it continues giving me the same error.
>> Best regards,
>> Yessica Brinkmann
>>
>> El jue., 10 oct. 2019 a las 13:33, Yessica Brinkmann (<
>> yessica(dot)brinkmann(at)gmail(dot)com>) escribió:
>>
>>> Thank you so much for your answer. I will be testing the indicated and
>>> then I give you return.
>>> Best regards,
>>> Yessica Brinkmann
>>>
>>> El jue., 10 oct. 2019 a las 13:14, Tom Lane (<tgl(at)sss(dot)pgh(dot)pa(dot)us>)
>>> escribió:
>>>
>>>> Yessica Brinkmann <yessica(dot)brinkmann(at)gmail(dot)com> writes:
>>>> > I really thought a lot, but I don't understand why but the function
>>>> fails
>>>> > after the expression is executed:
>>>> > appendStringInfo (& cols, "% s a.attnum =% d", (i> 0? "OR": ""),
>>>> idxcd->
>>>> > varattno [i]);
>>>>
>>>> I think you're probably shooting yourself in the foot here:
>>>>
>>>> /* pfree() the memory allocated for the previous candidate.
>>>> FIXME: Avoid
>>>> * meddling with the internals of a StringInfo, and try to
>>>> use an API.
>>>> */
>>>> if( cols.len > 0 )
>>>> {
>>>> pfree( cols.data );
>>>> cols.data = NULL;
>>>> } /*IF col.len>0*/
>>>>
>>>> Don't do that, use resetStringInfo() instead.
>>>>
>>>> regards, tom lane
>>>>
>>>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-10-10 19:20:15 Re: plpgsql copy import csv double quotes
Previous Message Jaime Soler 2019-10-10 18:25:32 Re: The connection to the server was lost. Attempting reset: Failed.