pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Richards <michael@fastmail.ca>
To: pgsql-sql@postgresql.org
Subject: Table locking.
Date: Wed, 10 Jan 2001 22:18:41 -0500 (EST)
Message-ID: <3A5D2611.00001D.86746@frodo.searchcanada.ca> (raw)

Hi.

I've always had trouble understanding how to properly deal with the 
following case.

I need to run an insert on a table but I don't want any other 
transactions to commit the insert before me. Within the logic of the 
program, I run a select to see if there is a value there, then the 
insert. Between these 2 statements someone could commit one that 
causes the insert to fail.

Is there a better way to do this than locking the table in SHARE ROW 
EXCLUSIVE MODE and trying to be certain that anything else that may 
call an insert there asks for the same type of lock?

-Michael
_________________________________________________________________
     http://fastmail.ca/ - Fast Free Web Email for Canadians
From pgsql-sql-owner@postgresql.org  Wed Jan 10 23:59:39 2001
Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28])
	by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0B4bBB90828
	for <pgsql-sql@postgresql.org>; Wed, 10 Jan 2001 23:37:11 -0500 (EST)
	(envelope-from pgsql-sql-owner@postgresql.org)
Received: from paprika.michvhf.com (adsl-dynamic35-204.detroit.mi.ameritech.net [64.108.244.204] (may be forged))
	by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f09FLEB22185
	for <pgsql-sql@postgresql.org>; Tue, 9 Jan 2001 10:21:14 -0500 (EST)
	(envelope-from vev@michvhf.com)
Received: (qmail 17781 invoked by uid 1001); 9 Jan 2001 15:21:10 -0000
Date: Tue, 9 Jan 2001 10:21:10 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: The Hermit Hacker <scrappy@hub.org>
cc: Kaare Rasmussen <kar@webline.dk>, <pgsql-hackers@postgresql.org>,
   <pgsql-sql@postgresql.org>
Subject: Re: [HACKERS] Re: PostgreSQL web page
In-Reply-To: <Pine.BSF.4.31.0101090857120.21326-100000@thelab.hub.org>
Message-ID: <Pine.BSF.4.30.0101091007350.17695-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Archive-Number: 200101/102
X-Sequence-Number: 763

On Tue, 9 Jan 2001, The Hermit Hacker wrote:

> On Tue, 9 Jan 2001, Kaare Rasmussen wrote:
>
> > I wonder why http://www.postgresql.org is not updated with news. The
> > latest "Latest News" is from Nov 16. I have to go to
> > http://www.pgsql.com to find some interesting news later than that:
> > 2000-12-22 PostgreSQL, Inc. Releases Open Source Replication & Database
> > and                            2000-12-12 2000 Linux Journal Editor's
> > Choice Award for Best Database
> >
> > In fact I was looking for the Replication server. No mention seems to be
> > available on postgresql.org.
> >
> > Also the mailing list archive for pgsql-sql is not listed here:
> > http://www.postgresql.org/devel-corner/index.html  - but you can see it
> > if you write the correct URL yourself.
>
> I have no graphical browser right now, and lynx isn't installed, so I'm a
> bit at a disadvantage here ... but, pgsql-sql *should* be listed under
> users-gallery, not devel ... devel is -hackers, -bugs, -ports, etc ...

Unless the clock on hub was wrong, I have the award happening on
11/16/Y2K.   The replication server info was a press release by
PostgreSQL, Inc.  Not the PostgreSQL Global Development Group.   Between
GB and PG,Inc with the constant barrage of press releases I made the
decision months ago that NO press releases from ANY group would be posted
on the PostgreSQL website - these groups have their own websites for that
and PostgreSQL.org doesn't need to be caught up in the middle.

pgsql-sql is in the users section - both info and archives.

> Beyond that, the web site is maintained by Vince ... but I thought the
> Award was definitely up there already ...

Both on the main page and in latest news.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================






view thread (9+ messages)  latest in thread

Message-ID: <3A5D2611.00001D.86746@frodo.searchcanada.ca>
Permalink:  ../3A5D2611.00001D.86746@frodo.searchcanada.ca/
Also on:    postgresql.org/message-id/3A5D2611.00001D.86746@frodo.searchcanada.ca

 · 

reply

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: michael@fastmail.ca
  Subject: Re: Table locking.
  In-Reply-To: <3A5D2611.00001D.86746@frodo.searchcanada.ca>

* 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