Re: Problems with MemoryContextSwitchTo () - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Problems with MemoryContextSwitchTo ()
Date
Msg-id CAFj8pRCsKMskdk6Z7fta1=zb26eNdAJKR2+t+Z7qSspSB=oMdg@mail.gmail.com
Whole thread Raw
In response to Problems with MemoryContextSwitchTo ()  (Yessica Brinkmann <brinkmann.yessica@gmail.com>)
Responses Re: Problems with MemoryContextSwitchTo ()
List pgsql-general


st 16. 9. 2020 v 15:09 odesílatel Yessica Brinkmann <brinkmann.yessica@gmail.com> napsal:
Well, the fact is that I have a function called get_columnnames, which in the second foreach, is printing the values of idxcd-> varattnnames [i] the null value. This is the error.

How you get this list? It is result of SPI_exec*** ?

There is SPI_finish(), that cleaning a memory used by SPI interface, and theoretically it can clean result of previous query.

Regards

Pavel



-------- Mensaje original --------
Asunto: Re: Problems with MemoryContextSwitchTo ()
De: Pavel Stehule
Para: Yessica Brinkmann
CC: pgsql-general




st 16. 9. 2020 v 13:32 odesílatel Yessica Brinkmann <brinkmann.yessica@gmail.com> napsal:
Good Morning.
I will greatly appreciate a help please on this subject. I actually did several tests already and tried a lot to fix it myself. But I am not able to. And I really need to know this in order to finish my university thesis. If someone can help me please.
Best regards,
Yessica Brinkmann

please, can you attach your code, and can you show the error message?

It is hard to say what is the problem from your mail?

Regards

Pavel




El mié., 16 sept. 2020 a las 0:42, Yessica Brinkmann (<brinkmann.yessica@gmail.com>) escribió:


Hello.
I think several of you will already remember me. I'm the one with the IndexAdviser topic. Only that I changed my email address.
As you may recall, I am doing my thesis on the subject of IndexAdviser modifications.
I really appreciate the help they have given me in various Postgresql groups.
Well, I was really nearing the end of the programming part of the thesis, when I had a problem to be able to compile my program in a moment, and by accident some lines of source code were moved.
And for this reason, I think I have problems again with the context switch issue, since at some point my context switch stopped working for me, I think because of the issue that some lines of source code were moved.
Well, the fact is that I have a function called get_columnnames, which in the second foreach, is printing the values of idxcd-> varattnnames [i] the null value.
This second foreach, I only do it to test if the data is really saved well and if I can recover it properly.
And since the data is not retrieved properly, or is not saved properly, in the following functions of my program, the value of idxcd-> varattnnames [i] continues to appear as null.
I will appreciate a lot please help, if you can tell me please why the function prints null in the values of idxcd-> varattnnames [i], in the second foreach, if it is due to an error in the context switch, or why it could be .
I send my function as an attachment.

Best regards,
Yessica Brinkmann.

pgsql-general by date:

Previous
From: Ben
Date:
Subject: Re: Obvious data mismatch in View2 which basically SELECT * from View1
Next
From: Ben
Date:
Subject: Re: Obvious data mismatch in View2 which basically SELECT * from View1