By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,542 Members | 1,434 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,542 IT Pros & Developers. It's quick & easy.

"another command is already in progress" error

P: n/a
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

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

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.

"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.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 11 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.