Hi there,<div><br></div><div>I'm seeking help to address an issue I presently have with a Server application that uses TPostgres components.</div><div><br></div><div>Each manager thread has its own Connection, Transaction, and TQuery.</div>
<div>Each manager can handle potentially thousands of sockets</div><div>Each server instance (1 process) can have up to ~100 manager threads.</div><div><br></div><div>Each Manager executes socket "commands" that translate at some point, into a Database, Select, Update, or Delete.</div>
<div><br></div><div>My current problem: </div><div>If a user updates a table by uploading large a video (say about 200+MB) the sql server locks pretty much every table and prevents other sockets which during the SQL execution. This is true for Delete and Update as of v9.1.</div>
<div><br></div><div>Implications. Parallel commands executed on other threads aren't able to execute b/c the postgresql server just sits there waiting for the update transaction to complete. PostgreSQL is locking all subsequent calls to even other tables.</div>
<div><br></div><div>Remediation: Memory barriers are already in place to ensure that other threads don't access the TConnection,TQuery or other things during the problematic transaction. Is there a way to use specify a SHARE mode in transactions for TPostgres component?</div>
<div><br></div><div>How have anyone who've encountered this problem solved this issue? Any feedback is welcome.</div>