From: John R Pierce <pierce@hogranch.com>
To: PostgreSQL <pgsql-general@postgresql.org>
Subject: Re: Asynchronous query execution
Date: Wed, 08 Dec 2010 05:40:32 -0800
Message-ID: <4CFF8AD0.5080602@hogranch.com> (raw)
In-Reply-To: <AANLkTimU+OEjrMZCD0=bsW9qHPSAgJ1RTBymV=7j-wS7@mail.gmail.com>
References: <AANLkTimU+OEjrMZCD0=bsW9qHPSAgJ1RTBymV=7j-wS7@mail.gmail.com>
On 12/08/10 5:35 AM, c k wrote:
> Hello,
> I would like to know how can we execute the queries asynchronously?
> If we use and execute plpgsql functions they just completes the
> execution or throws an error on error. In between next sql statement
> waits for the previous one to complete the execution. But in few
> situations it is required not to wait for getting the completion of
> previous sql statement. How can this e achieved?
>
one postgresql connection can only run one query at a time.
run your asynchronous queries from a thread with its own connection
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: pierce@hogranch.com, pgsql-general@postgresql.org
Subject: Re: Asynchronous query execution
In-Reply-To: <4CFF8AD0.5080602@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox