From: Douglas McNaught <doug@mcnaught.org>
To: Surabhi Ahuja <surabhi.ahuja@iiitb.ac.in>
Cc: pgsql-general@postgresql.org
Subject: Re: transactions
Date: Mon, 06 Jun 2005 09:21:15 -0400
Message-ID: <m2vf4r39kk.fsf@Douglas-McNaughts-Powerbook.local> (raw)
In-Reply-To: <CE5C48E227F8ED4990FAC4332100ADC621B543@EVS.iiitb.ac.in>
References: <CE5C48E227F8ED4990FAC4332100ADC621B543@EVS.iiitb.ac.in>
"Surabhi Ahuja " <surabhi.ahuja@iiitb.ac.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: doug@mcnaught.org, surabhi.ahuja@iiitb.ac.in
Subject: Re: transactions
In-Reply-To: <m2vf4r39kk.fsf@Douglas-McNaughts-Powerbook.local>
References: <CE5C48E227F8ED4990FAC4332100ADC621B543@EVS.iiitb.ac.in> <m2vf4r39kk.fsf@Douglas-McNaughts-Powerbook.local>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox