Re: transactions

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: "Surabhi Ahuja " <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: transactions
Date: 2005-06-06 13:21:15
Message-ID: m2vf4r39kk.fsf@Douglas-McNaughts-Powerbook.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Surabhi Ahuja " <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in> writes:

> Hello everyone.
> I have the following question:
>
> say i have two transactions going on simultaneoulsy.
> in one transaction i do an insertion
> and the other transaction i do a delete.
> what will happen if in both the transactions, the insert(in one) and
> delete(in the other) are issued at exactly the same time? will bothe get
> blocked and enter into a deadlock, if yes then do both the transactions
> get aborted after some time of waiting.

The transactions will be executed completely independently, unless you
do explicit locking (via SELECT FOR UPDATE or LOCK TABLE).

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message grupos 2005-06-06 13:24:03 Re: Large Object => invalid input syntax for integer: ""
Previous Message Michael Fuhr 2005-06-06 12:57:06 Re: Download mirrors not found?