From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: is an explicit lock necessary?
Date: Thu, 4 May 2006 14:47:48 -0400
Message-ID: <20060504184748.GD21437@phlogiston.dyndns.org> (raw)
In-Reply-To: <20060504181056.14509.qmail@web52510.mail.yahoo.com>
References: <20060504181056.14509.qmail@web52510.mail.yahoo.com>
On Thu, May 04, 2006 at 11:10:56AM -0700, Ash Grove wrote:
> Hi,
>
> Does beginning a transaction put locks on the tables
> queried within the transaction?
You mean like a table lock? No. A transaction does entail some
locks: for instance, an access exclusive lock will block behind your
share lock while you're looking at the table (because the exclusive
lock wants to be exclusive, of course). See the concurrency control
section of the manual.
> In the example below, is #2 necessary? My thought was
No. currval() is local to your _session_ (not even your
transaction). The docs explain how this works.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
--Alexander Hamilton
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ajs@crankycanuck.ca
Subject: Re: is an explicit lock necessary?
In-Reply-To: <20060504184748.GD21437@phlogiston.dyndns.org>
* 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