Re: libpq thread safety
От | Tom Lane |
---|---|
Тема | Re: libpq thread safety |
Дата | |
Msg-id | 16851.1356634922@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | libpq thread safety (Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk>) |
Ответы |
Re: libpq thread safety
|
Список | pgsql-general |
Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk> writes: > Do any special precautions need to be taken when PQNotifies is being > called, to make sure that nothing else is referencing the handle? It's pretty much the same as any other operation on a PGconn: if there could be more than one thread touching the connection object concurrently, you'd be well advised to add some application-level locking. http://www.postgresql.org/docs/9.2/static/libpq-threading.html The lack of any such locking inside libpq is partly historical, and partly because in many practical situations you'll need application-side locks anyway to protect application data structures associated with the connection. regards, tom lane
В списке pgsql-general по дате отправления: