Memory Context problems...

From: "Katsaros Kwn/nos" <ntinos(at)aueb(dot)gr>
To: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Memory Context problems...
Date: 2004-11-07 17:13:55
Message-ID: 1099847634.12836.18.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi everybody,
I have some problems with management of memory contexts (at least I
thing so). I'll try to describe my problem in a few lines:

I've written some code based on spi.c. I've created my_spi.c (and
my_spi.h) which provide some more features I wanted (did not alter spi
itself to keep code clear). Anyway, I've managed to get them into the
backend and call some of the functions from a user defined function. The
problem is that I experience some problems during the transition from
one memory context to another.

More precisely,when I call (my_)SPI_prepare the following message comes
exactly at the point where (my_)SPI_end_call(true) is called:

WARNING: problem in alloc set my_SPI Exec: detected write past chunk
end in block 0x830b7e8, chunk 0x830c058
WARNING: problem in alloc set my_SPI Exec: detected write past chunk
end in block 0x8307720, chunk 0x830b6cc

Moreover, when I true to call (my_)SPI_finish the server crashes.

Note, that the results expected from the my_SPI calls are returned
correctly.

Any ideas? I think it is something with the memory contexts but
obviously this is not enough to solve the problem.

Thank you in advance!
Ntinos Katsaros

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-11-07 18:29:26 pg_arch.c call to sleep()
Previous Message Andrew Dunstan 2004-11-07 17:02:23 Re: cygwin build failure