From: Neil Conway <neilc@samurai.com>
To: Jean-Christian Imbeault <jc@mega-bucks.co.jp>
Cc: PostgreSQL General <pgsql-general@postgresql.org>
Subject: Re: Locking rows
Date: 28 Feb 2003 10:08:46 -0500
Message-ID: <1046444926.430.90.camel@tokyo> (raw)
In-Reply-To: <3E5F396F.4090507@mega-bucks.co.jp>
References: <3E5F396F.4090507@mega-bucks.co.jp>
On Fri, 2003-02-28 at 05:26, Jean-Christian Imbeault wrote:
> I have written an application that prints out data from a database. One
> problem I am encountering is in the time it takes to generate the print
> file the data may have changed.
Is that a problem? ISTM that if you need to keep the DB consistent
during the entire print job, you're going to get pretty poor concurrent
performance regardless.
> I've read the iDocs and Bruce's online manual but can seem to find any
> info on the syntax for locking other that for SELECT FOR UPDATE. And
> even then the docs don't state how to remove the lock created by a
> SELECT FOR UPDATE.
The docs on FOR UPDATE say:
This prevents them from being modified or deleted by other transactions
until the current transaction ends; that is, other transactions that
attempt UPDATE, DELETE, or SELECT FOR UPDATE of these rows will be
blocked until the current transaction ends.
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
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: neilc@samurai.com, jc@mega-bucks.co.jp
Subject: Re: Locking rows
In-Reply-To: <1046444926.430.90.camel@tokyo>
References: <3E5F396F.4090507@mega-bucks.co.jp> <1046444926.430.90.camel@tokyo>
* 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