From: | frenzy(at)frenzy(dot)org |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | "another command is already in progress" error |
Date: | 2003-09-11 04:06:29 |
Message-ID: | Pine.LNX.4.50.0309102048110.18295-100000@frenzy.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-09-11 04:25:53 | Re: State of Beta 2 |
Previous Message | Caroline Yong | 2003-09-11 03:55:27 | how to replicate database |