[zeromq-dev] Question about CZMQ threading and Postgres
Michael Powell
mwpowellhtx at gmail.com
Fri Jan 31 14:07:22 CET 2014
I don't know Postgres that well either, but in general, when you have
a concurrency issue, you use a mutex or a semaphore to fence that
area.
On Fri, Jan 31, 2014 at 6:58 AM, Alan Ward <alan.ward at btinternet.com> wrote:
> Hi Michael,
> Thanks for your quick response.
>
> I agree it is not a 0MQ issue, I am just trying to find out if anybody else had the same problem in this environment and solved it.
>
> Thanks
> Alan Ward
>
> (Sent from my iPad)
>
>> On 31 Jan 2014, at 12:06, Michael Powell <mwpowellhtx at gmail.com> wrote:
>>
>> This doesn't sound like a 0MQ issue, but I don't know the 0MQ
>> threading model that well. I sounds more like a Postgres issue. You
>> want to protect your database with a memory fence like a semaphore or
>> mutex. Or rethink your architecture.
>>
>>> On Fri, Jan 31, 2014 at 5:47 AM, Alan Ward <alan.ward at btinternet.com> wrote:
>>> Hi,
>>> I would like to find out if anyone has successfully run multiple worker
>>> threads created by CZMQ zthread_fork, where each thread is the same and
>>> running Postgres updates to the same database.
>>>
>>> My system works fine if I use one worker thread, but if I increase it to
>>> (say) 3, Postgres fails with (undocumented) YE000 errors.
>>>
>>> Searching the net finds some instances of this error being reported in 2007
>>> and it relates to problems with concurrent access from multiple threads.
>>>
>>> Should I be using zthread_new?
>>>
>>> Thanks,
>>> Alan
>>>
>>>
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list