Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and shift/reduce)

From: Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <wieck(at)debis(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and shift/reduce)
Date: 1999-12-07 18:40:49
Message-ID: Pine.GSO.4.02A.9912071929470.3057-100000@Panter.DoCS.UU.SE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 7 Dec 1999, Tom Lane wrote:

> > Um, you could call another psql from within psql, like so:
>
> > /* psql script */
> > create this
> > select that
> > \! psql -f 'second-script'
> > select more
>
> > That satisfies the requirement of two separate sessions and a predefined
> > order.
>
> I assume that the \! command won't continue until the subjob exits?
> If so, this doesn't give us any way to verify that query A will wait for
> query B to finish ... at least not without locking up the test...

I'm kind of losing you here. You want parallel execution *and* a
predefined order of execution? In my (limited) book, those contradict each
other a little bit. If it helps you can also do this:
\! psql -f 'second-script' >& output &
and the thus invoked script will happily continue executing even after you
quit the first psql.

I guess you could also do some simple synchronization things, like have
the second psql wait on a file to spring into existence:
/* second-script */
\! while [ ! -f /tmp/lock.file ]; do ;; done
\! rm /tmp/lock.file

Kind of like a simple semaphore. Isn't that what you are getting at?

In the overall view of things it almost seems like these kind of tests
need a human eye supervising them, because how do really determine "query
A waits for query B to finish" otherwise?

--
Peter Eisentraut Sernanders vaeg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1999-12-07 18:59:15 Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and
Previous Message Vince Vielhaber 1999-12-07 18:37:50 Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and shift/reduce)