PostgreSQL and multiple database access

Started by T.J.Farrellalmost 26 years ago3 messagesgeneral
Jump to latest
#1T.J.Farrell
T.J.Farrell@wanadoo.fr

Hi,

I work in an environment where people can update the PostgreSQL database from several sites (insert, update, delete statements).
If two people try to update, insert or delete the same row at the same time, or if one deletes a row that the other is viewing and trying to update, in postgreSQL, what happens??

I'm looking from success/failure stories, tips anything that can help me code consequently!

TIA

T.J.

#2Charles Tassell
ctassell@isn.net
In reply to: T.J.Farrell (#1)
Re: PostgreSQL and multiple database access

You could use locking for this (as someone else suggested) but you'd
probably be better off using transactions. That way no one will get an
error, and whoever commits last will have the final say of what the record
is set to.

At 05:41 PM 6/7/00, you wrote:

Show quoted text

Hi,

I work in an environment where people can update the PostgreSQL database
from several sites (insert, update, delete statements).
If two people try to update, insert or delete the same row at the same
time, or if one deletes a row that the other is viewing and trying to
update, in postgreSQL, what happens??

I'm looking from success/failure stories, tips anything that can help me
code consequently!

TIA

T.J.

#3Barnes
aardvark@ibm.net
In reply to: T.J.Farrell (#1)
RE: PostgreSQL and multiple database access

Chapter 10 of Bruce's book has a really good discussion of locking and all
that.(I was reading it yesterday.) The book is at

http://www.postgresql.org/docs/aw_pgsql_book/

Barnes
-----Original Message-----
From: pgsql-general-owner@hub.org [mailto:pgsql-general-owner@hub.org]On
Behalf Of T.J.Farrell
Sent: Wednesday, June 07, 2000 4:42 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] PostgreSQL and multiple database access

Hi,

I work in an environment where people can update the PostgreSQL database
from several sites (insert, update, delete statements).
If two people try to update, insert or delete the same row at the same
time, or if one deletes a row that the other is viewing and trying to
update, in postgreSQL, what happens??

I'm looking from success/failure stories, tips anything that can help me
code consequently!

TIA

T.J.