how to ensure a client waits for a previous transaction to finish?

From: Dan Kortschak <dan(dot)kortschak(at)adelaide(dot)edu(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: how to ensure a client waits for a previous transaction to finish?
Date: 2009-12-07 21:00:07
Message-ID: 1260219607.10944.8.camel@epistle
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, this is a bit of a noob question.

I am using PGSql to perform some large analyses, with the clients being
a sequentially run set of perl scripts (one to set up and populate
tables and then down stream scripts to query the database for the
results).

During manual testing everything works, but automating it results in the
query scripts starting before the population transactions having
completed, so they give erroneous result.

How can I ensure the query scripts wait until the population transaction
processes have finished? I've looked at 'SET TRANSACTION ISOLATION LEVEL
SERIALIZABLE' (to us in the query scripts I thought), but I'm not sure
that is what I want.

Can any one suggest where I should be looking, or if SET TRANSACTION is
the right way to go?

thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-12-07 21:12:41 Re: how to ensure a client waits for a previous transaction to finish?
Previous Message Alan Hodgson 2009-12-07 19:09:41 Re: Add pg server to cluster