implementing a read lock

From: snacktime <snacktime(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: implementing a read lock
Date: 2006-08-26 19:51:15
Message-ID: 1f060c4c0608261251s7f02250ah95fbd2b539faeac2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have an application that processes credit card transactions,and
contains a table called authorizations. The authorizations table
contains information returned by the bank necessary to capture the
transaction. Nothing should block the application from inserting new
rows into the authorizations table. When the authorizations are
captured, one or more rows will be fetched, captured, and if
successful the rows will be deleted. No updates are done on the
table, only inserts or deletes. Naturally I want to prevent
different instances of the same application from trying to select the
same rows to capture, resulting in duplicate charges. I can't lock
the whole table because new authorizations are constantly coming in.
Is creating a separate table that I use just as a lock table the best
approach?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Silvela, Jaime (Exchange) 2006-08-26 20:03:05 Re: mising chunk
Previous Message Perez 2006-08-26 19:51:06 xpath_string and group by