Tom Lane wrote: > I wrote: > > What seems possibly more useful is to reintroduce \cwait (or hopefully > > some better name) and give it the semantics of "wait for a response from > > any active connection; switch to the first one to respond, printing its > > name, and print its result". > > It strikes me that with these semantics, \cwait is a lot like a thread > join operation, so we could call it \join or \j.
FWIW on POSIX shell there's something similar called "wait". http://www.opengroup.org/onlinepubs/009695399/utilities/wait.html Perhaps we should define the operator after these semantics -- these guys have probably hashed up a good interface. Basically it means we would have a "\cwait [n ...]" command meaning "wait for the connection 'n' to return". If we do that, we can then have multiple commands in flight on regression tests, and wait for them in whatever deterministic order we choose, regardless of which one finishes execution first. However, the no-operands version of POSIX wait means "wait for all commands" instead of "wait for any command". Perhaps we could have "\cwait -" as meaning "wait for any command". -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers