Comments (3)
I think you have a good point here.
I think this issue didn't appear before because we are always asking users to use the pattern of open the connection, use it and then close it. This way, it isn't normal to accumulate too much prepared statements.
Another point is that we discouraged the use of prepared statements because they had poor performance. Now that Glen added a lot of optimizations, I think more and more prepared statements will be used and this issue may start to be noticed.
Thank you very much, Udo, for bringing our attention to this. We will work on it for the 2.2 release. I'll add a milestone to indicate that.
from npgsql.
Guys, this is a pretty important item, I'll take a look at it, hopefully it will make it into 2.2.
from npgsql.
Implementation note to self: we can't do any sort of database interaction from with Dispose() (i.e. DEALLOCATE) since when executed from the finalizer (can be whenver) this causes contention on the database connection with whatever query is actually being executed.
Can't lock either, since any sort of blocking within a finalizer is a big no-no.
So need to push the DEALLOCATE to a queue to be processed at the earliest convenience. It would be nice to be able to check, from Dispose(), whether the connection is in use (TryLock) and have a fast-path, but there's no such lock currently in Npgsql. This mechanism would also be relevant for #270.
from npgsql.
Related Issues (20)
- Unnecessary escalation to prepared transactions HOT 13
- Remove SCM credential message and auth type
- Setting UnknownResultTypeList sometimes destabilizes connection. HOT 11
- TransactionScope, SET CONSTRAINTS all DEFERRED, COPY, foreign key evaluation issue HOT 11
- Integrate `ReplicationConnection` with `NpgsqlDataSource` HOT 2
- Returning multiple cursors HOT 6
- Is it possible to preprocess parameters before executing a command HOT 4
- Support PG17 interval infinity
- Schema lookup on temp tables HOT 2
- All pre-8.0.3 version NuGet packages are shown as vulnerable whereas more versions are listed as patched on the Security issue HOT 5
- Incorrect NuGet packages marked as vulnerable HOT 1
- TypeLoadException : v8 make crashed tests in GitHub Actions HOT 4
- How to pass array of user defined type in Npgsql? HOT 2
- Strong name signature could not be verified in version 4.0.14 HOT 5
- Backend memory leak when using command parameters after generating notifications HOT 8
- Otel: db.statement tag is not written to activity HOT 1
- DISCARD SEQUENCES is useless and not scalable HOT 3
- Version 4.0.14 is not working with PostgreSQL versions 9.5 and 9.6. HOT 4
- TransactionScope issue: prepared transactions are disabled HOT 5
- Support quoted type names in NpgsqlParameter.DataTypeName
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npgsql.