Giter Site home page Giter Site logo

Server-side memory leak in PostgreSQL about soci HOT 6 CLOSED

soci avatar soci commented on May 11, 2024
Server-side memory leak in PostgreSQL

from soci.

Comments (6)

mloskot avatar mloskot commented on May 11, 2024

Can you confirm use are using prepared statements?
Recently, fix for prepared statement leak has been applied (see 02bb841b).

Unfortunately, the fix is causing regression. You can take a look at detailed explanation posted in the issue #13
I haven't had chance to come up with solution of this problem yet.

from soci.

b-s-a avatar b-s-a commented on May 11, 2024

yes. I have use prepared statements (for rowset only).

from soci.

mloskot avatar mloskot commented on May 11, 2024

And, can you confirm you have tried the source code with the fix for prepared statement leak applied. Namely, are you using SOCI with 02bb841b changes?

from soci.

b-s-a avatar b-s-a commented on May 11, 2024

Yes. I confirm. I have use TODAY master. And I in real-time see (top), that postgres process eats 100KB per second (I do prepare every second).

from soci.

b-s-a avatar b-s-a commented on May 11, 2024

I use prepare only in this construction:
{
soci::rowsetsoci::row res = (db.prepare << ....);
for(soci::rowsetsoci::row::iterator it = res.begin(), end = res.end(); it != end; ++it)
....
}

from soci.

mloskot avatar mloskot commented on May 11, 2024

The fix has been merged into master SHA1: 8c05035
It also seems to solve the problem reported in the issue #13, great!
So, I'm going to partially revert the SHA1: 02bb841 fix, to avoid Premature deallocation of prepared statement. The SHA1: 8c05035 fix should be sufficient for that scenario too.

Thank you!

from soci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.