"Sabin Coanda" <sabin.coanda@deuromedia.ro> writes:
> Then I try to use the following procedure to catch the concurrency access
> occurence and retry until both scripts succeed:
What makes you think they ever will succeed? Once one of these guys has
hit a failure, you've got a tight loop of retrying the same command and
getting the same failure.
regards, tom lane