Concurrency question - Mailing list pgsql-general

From David Welton
Subject Concurrency question
Date
Msg-id 9877cd600603280456r38b2e412gd62ee3cd3b585637@mail.gmail.com
Whole thread Raw
Responses Re: Concurrency question  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-general
Hi,

I'm trying to figure out the best way to handle the following situation.

There are two processes, A, and B.

A is a daemon process that performs a select, and then slowly iterates
over the results, performing updates along the way.

It is possible that interactive process B comes along, and wants to
change the data that A is working with.  B should not 1) hang or 2)
fail (it's interactive, and in this case the user is always right).
It's not optimal, but it would be ok if A failed - indeed, it would be
better than if it kept working with the (now incorrect) data that it
pulled from the select prior to the user's intervention.

Thoughts?

Thankyou for any insight you can send my way!
--
David N. Welton
 - http://www.dedasys.com/davidw/

Linux, Open Source Consulting
 - http://www.dedasys.com/

pgsql-general by date:

Previous
From: David Hoksza
Date:
Subject: Re: ambulkdelete
Next
From: "Gevik Babakhani"
Date:
Subject: deleting function from pg_catalog.pg_proc