-
Notifications
You must be signed in to change notification settings - Fork 16
cursor leak #32
Comments
yes,memory leak!i have the same problem!have some new news to slove this question? |
Seens that this issue is not resolved, how can we get help? |
I was thinking about rewriting it, but I'm not so enthusiastic because server.rows works fine for me and I don't know how to rewrite it fast |
Maybe it's just a missing SPI_freetuptable... |
I tried, but after that some tests were broken. It looks like this: local r = cur:fetch(1)
local lost_value = r.column
r = cur:fetch(1) -- SPI_freetuptable can destroy lost_value |
i use this through SPI_xxx function,my memoy leak faster. i want to know why? |
@eugwne ,you say " server.rows works fine for you",how to use it,can you tell me your lua script?thank you! |
do $$
for row in server.rows("select 42 as column") do
print(row.column)
end
$$ language pllua |
Is there any plan to fix this bug? |
@eugwne, Segmentation fault (PID 24109) why? |
postgres compiled with enable-debug? |
yes,i add enable-debug option。 |
postgres fills data with a garbage when debug enabled, pllua makes no copy and gets garbage |
but i just exec |
i cann't understand your answer? when does postgres fill data with a garbage? |
in pg it looks like this : |
if i add enable-debug option, how to fix this bug? |
one way is to make always copy values from pg to lua, another - make lua gc and pg memory contexts work together |
Why not just always copy values from pg to lua. |
@eugwne Kudos on all your work. I'm glad to see this getting some love. I've been reading through the issues. To be clear, this is a low-level binding when compared to PL/V8 and it's helpful to know a bit about luajit and pg (and read the code/examples) if we hit issues? |
leak example:
The text was updated successfully, but these errors were encountered: