| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: plperlu stored procedure seems to freeze for a minute |
| Date: | 2015-12-01 18:13:27 |
| Message-ID: | 16344.1448993607@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Peter J. Holzer" <hjp-pgsql(at)hjp(dot)at> writes:
> But there is something else which may be relevant: MQ uses threads
> internally, and I don't actually know whether zmq_msg_recv returning
> means that the read(2) call (or whatever) on the socket terminates.
... ugh ...
> Postgres worker processes are single-threaded, are they? Is there
> something else which could interact badly with a moderately complex
> multithreaded I/O library used from a stored procedure?
Yes, lots. If you cause additional threads to appear inside a backend
process, things could break arbitrarily badly. It's up to you to ensure
that none of those extra threads ever escape to execute any non-Perl
code. I suspect this could easily explain the problems you're seeing.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2015-12-01 18:20:09 | Re: plperlu stored procedure seems to freeze for a minute |
| Previous Message | Adrian Klaver | 2015-12-01 18:01:06 | Re: 2 questions |