On Tue, Dec 21, 2010 at 6:11 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Merlin Moncure mmonc...@gmail.com writes:
On Tue, Dec 21, 2010 at 6:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
If you just unconditionally flush there, it will result in an extra
network message in the normal case where there's
On Wed, Dec 22, 2010 at 10:07 AM, Kelly Burkhart
kelly.burkh...@gmail.com wrote:
On Tue, Dec 21, 2010 at 6:11 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Merlin Moncure mmonc...@gmail.com writes:
On Tue, Dec 21, 2010 at 6:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
If you just unconditionally flush
On Wed, Dec 22, 2010 at 9:18 AM, Merlin Moncure mmonc...@gmail.com wrote:
On Wed, Dec 22, 2010 at 10:07 AM, Kelly Burkhart
kelly.burkh...@gmail.com wrote:
On Tue, Dec 21, 2010 at 6:11 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Merlin Moncure mmonc...@gmail.com writes:
On Tue, Dec 21, 2010 at 6:49
On Wed, Dec 22, 2010 at 11:38 AM, Kelly Burkhart
kelly.burkh...@gmail.com wrote:
On Wed, Dec 22, 2010 at 10:19 AM, Merlin Moncure mmonc...@gmail.com wrote:
have you ruled out sending all the data you need to send into say, a
plpgsal function and doing the work there?
Not sure that would do
Hello, I'm sending a group of queries to the database with PQsendQuery
and using PQgetResult to return results similar to this:
PQsendQuery( select current_timestamp; select pg_sleep(1); select
current_timestamp );
while( result = PQgetResult() )
doSomethingWith( result )
I'm finding that
You can't concurrently execute queries from within a single
connection. Perhaps you should use multiple connections, while
understanding the implications of having each operate within a
separate snapshot.
Don't forget to free memory with PQclear() . I guess you omitted that
because it's just
On Tue, Dec 21, 2010 at 2:21 PM, Peter Geoghegan
peter.geoghega...@gmail.com wrote:
You can't concurrently execute queries from within a single
connection. Perhaps you should use multiple connections, while
understanding the implications of having each operate within a
separate snapshot.
OP
Yes, I omitted the PQclear for simplicity.
I'm not concurrently executing queries, I'm sending multiple queries
to be executed serially by the backend. I'm expecting the server to
send me the PQresult objects as each query completes rather than
sending them all *after* all of the queries have
This should do it:
#include stdio.h
#include stdlib.h
#include libpq-fe.h
#define CONNINFO your info here
#define COMMANDS select current_timestamp; select pg_sleep(5); select
current_timestamp
void fatal( const char *msg ) { fprintf( stderr, %s\n, msg ); exit(1); }
int
main()
{
PGresult
Kelly Burkhart wrote:
#define COMMANDS select current_timestamp; select pg_sleep(5); select
current_timestamp
You should use current_clock() instead of current_timestamp, because
current_timestamp returns a fixed value throughout a transaction.
Best regards,
--
Daniel
On Tue, Dec 21, 2010 at 3:07 PM, Daniel Verite dan...@manitou-mail.org wrote:
Kelly Burkhart wrote:
#define COMMANDS select current_timestamp; select pg_sleep(5); select
current_timestamp
You should use current_clock() instead of current_timestamp, because
current_timestamp returns a
On Tue, Dec 21, 2010 at 3:14 PM, Merlin Moncure mmonc...@gmail.com wrote:
On Tue, Dec 21, 2010 at 3:07 PM, Daniel Verite dan...@manitou-mail.org
wrote:
Kelly Burkhart wrote:
#define COMMANDS select current_timestamp; select pg_sleep(5); select
current_timestamp
You should use
On Tue, Dec 21, 2010 at 3:37 PM, Merlin Moncure mmonc...@gmail.com wrote:
On Tue, Dec 21, 2010 at 3:14 PM, Merlin Moncure mmonc...@gmail.com wrote:
On Tue, Dec 21, 2010 at 3:07 PM, Daniel Verite dan...@manitou-mail.org
wrote:
Kelly Burkhart wrote:
#define COMMANDS select
On Tue, Dec 21, 2010 at 3:40 PM, Merlin Moncure mmonc...@gmail.com wrote:
On Tue, Dec 21, 2010 at 3:37 PM, Merlin Moncure mmonc...@gmail.com wrote:
On Tue, Dec 21, 2010 at 3:14 PM, Merlin Moncure mmonc...@gmail.com wrote:
On Tue, Dec 21, 2010 at 3:07 PM, Daniel Verite dan...@manitou-mail.org
Merlin Moncure mmonc...@gmail.com writes:
hm, a pq_flush() after command completion putmessage in
backend/tcop/dest.c seems to fix the problem. I'll send up a patch to
-hackers. They might backpatch it, unless there is a good reason not
to do this (I can't think of any).
If you just
On Tue, Dec 21, 2010 at 6:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Merlin Moncure mmonc...@gmail.com writes:
hm, a pq_flush() after command completion putmessage in
backend/tcop/dest.c seems to fix the problem. I'll send up a patch to
-hackers. They might backpatch it, unless there is a
Merlin Moncure mmonc...@gmail.com writes:
On Tue, Dec 21, 2010 at 6:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
If you just unconditionally flush there, it will result in an extra
network message in the normal case where there's not another query
to do. The current code is designed not to flush
17 matches
Mail list logo