"another command is already in progress" error (fwd)

Поиск
Список
Период
Сортировка
От pgsql@frenzy.org
Тема "another command is already in progress" error (fwd)
Дата
Msg-id Pine.LNX.4.50.0309111045290.20413-100000@frenzy.org
обсуждение исходный текст
Ответы Re: "another command is already in progress" error (fwd)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I am doing asynchronous sql calls using the postgres C library.
After doing two PQsendQuery() calls, I get the

"another command is already in progress" error.
The two calls I am doing are an update, and then an insert, in that order.
I am doing this for speed, since my program can't afford to wait for the
answer from the first to complete before making the request for the
second.

For some reason this method has started giving the error above, even
though it has been running on the same testing box for its entire
lifecycle and it wasn't before.

My two questions are:

1. Is there a way to get around this error besides doing some kind of busy
loop?

2. Is there a faster way of doing an update/insert than doing two
asynchronous requests? I want it to be as fast as possible. I was doing a
select first, then either an insert or an update depending on the entry
was there, but this method has speeded up our process by about 10x.

Thanks for the help, I've checked the archives, but am a new list member
myself, and hope to get to know postgresql more as time goes on.

Randy

http://www.frenzy.org
"Sed Quis Custodiet Ipsos Custodes?" -Juvenal

This communication (including any attachments) is intended for the use of the intended
recipient only and may contain information that is confidential, privileged or legally
protected. Any unauthorized use or dissemination of this communication is strictly
prohibited. If you have received this communication in error, please immediately notify
the sender by return e-mail message and delete all copies of the original communication.
Thank you for your cooperation.





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

Предыдущее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: The ..... worm
Следующее
От: "Keith G. Murphy"
Дата:
Сообщение: Re: The ..... worm