Re: BUG #5044: error: message type 0x5a arrived from server while idle

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #5044: error: message type 0x5a arrived from server while idle
Дата
Msg-id 20090909114949.GB4132@alvh.no-ip.org
обсуждение исходный текст
Ответ на BUG #5044: error: message type 0x5a arrived from server while idle  ("vyouzhi" <vyouzhi@gmail.com>)
Список pgsql-bugs
vyouzhi escribió:

> #!/usr/bin/env python
> #coding=utf-8
> import _pg
> import threading
>
> con =
> _pg.connect(host='127.0.0.1',user='work',dbname='work',passwd='123',port=543
> 2)
>
> def link_url():
>     global con
>     for i in range(100):
>         print i
>         stock_sql = "INSERT INTO  code (stock_name
> ,stock_code)values('bbbbb','bbbbb')"
>         try:
>             con.query(stock_sql)
>         except:
>             print stock_sql
>
> if __name__=='__main__':
>     for i in range(0,32):
>         print i
>         i = threading.Thread(target = link_url)
>         i.start()
>
> -----------------------------------------------

Not a bug.  Using a connection from more than one thread is not allowed.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: BUG #5043: Stored procedure returning different results for same arguments
Следующее
От: "mahmoud badr"
Дата:
Сообщение: BUG #5045: java developer