On Fri, May 15, 2020 at 6:25 PM Cameron Simpson wrote:
>
> On 15May2020 05:57, Stephane Tougard wrote:
> >On 2020-05-15, Chris Angelico wrote:
> >> Seconded. If you know how many threads you're going to have, just
> >> open
> >> that many connections. If not, there's a connection-pooling feature
On 15May2020 05:57, Stephane Tougard wrote:
On 2020-05-15, Chris Angelico wrote:
Seconded. If you know how many threads you're going to have, just
open
that many connections. If not, there's a connection-pooling feature as
part of psycopg2 (if I'm not mistaken). This would be far far easier
t
Op 15/05/20 om 00:36 schreef Stephane Tougard:
Hello,
A multithreaded software written in Python is connected with a Postgres
database. To avoid concurrent access issue with the database, it starts
a thread who receive all SQL request via queue.put and queue.get (it
makes only insert, so no
On 2020-05-15, Chris Angelico wrote:
> Seconded. If you know how many threads you're going to have, just open
> that many connections. If not, there's a connection-pooling feature as
> part of psycopg2 (if I'm not mistaken). This would be far far easier
> to work with than a fragile queueing setu
On Fri, May 15, 2020 at 9:20 AM Cameron Simpson wrote:
>
> On 14May2020 22:36, Stephane Tougard wrote:
> >A multithreaded software written in Python is connected with a Postgres
> >database. To avoid concurrent access issue with the database, it starts
> >a thread who receive all SQL request via
On 2020-05-14, MRAB wrote:
> On 2020-05-14 23:36, Stephane Tougard wrote:
>>
> Are there 100 threads running execute_sql? Do you put 100 "EXIT"
> messages into the queue, one for each thread?
Nope, the EXIT comes from the main thread at the very end, once all
other threads are dead already and
On 2020-05-14 23:36, Stephane Tougard wrote:
Hello,
A multithreaded software written in Python is connected with a Postgres
database. To avoid concurrent access issue with the database, it starts
a thread who receive all SQL request via queue.put and queue.get (it
makes only insert, so no issu
On 14May2020 22:36, Stephane Tougard wrote:
A multithreaded software written in Python is connected with a Postgres
database. To avoid concurrent access issue with the database, it starts
a thread who receive all SQL request via queue.put and queue.get (it
makes only insert, so no issue with the
Hello,
A multithreaded software written in Python is connected with a Postgres
database. To avoid concurrent access issue with the database, it starts
a thread who receive all SQL request via queue.put and queue.get (it
makes only insert, so no issue with the return of the SQL request).
As lon