Possible problem when updating a record from two clients at the same time?

From: "K(dot) Hoffrath" <NO_|kh|_SPAM(at)khoffrath(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: Possible problem when updating a record from two clients at the same time?
Date: 2005-07-22 19:11:41
Message-ID: dbrgdd$2erq$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all.

I'm converting a dos based application using DBase files to PostgresSQL.
The application is a pawn shop management system.

The dos application works as follows:
Table A holds all items which the customers bring to the shop.
Table B has one record for each day which holds the totals for this
particular day.
When B is updated, the particular record gets locked, updated and
released.

The new application works this way:
- start a new transaction,
- insert the new record in A,
- the insert operation fires a trigger which updates B
- commit transaction.

Now my question:
What happens if two clients insert a new record to A at the same time?
Will B get updated correctly or will one value get lost?

Thanks in advance.

Karsten

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2005-07-22 20:49:25 Multiple Inserts
Previous Message Pedro Tarrafeta 2005-07-22 18:12:16 Create a row-wise conditional view