Re: [SQL] idiom to mv recs => [NEW] bleeding lock?

From: Thomas Good <tomg(at)nrnet(dot)org>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] idiom to mv recs => [NEW] bleeding lock?
Date: 1998-10-26 13:18:48
Message-ID: Pine.LNX.3.96.981026080614.14466A-100000@mailhost.nrnet.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 26 Oct 1998, Jan Wieck wrote:

> Use a transaction and lock the source table first.
>
> BEGIN TRANSACTION;
> LOCK TABLE src_table;

Jan & Herouth,

I've been using this for some time but lately lots of data is going
into the system (hope this means more revenue as well ;-)

My point: when attempting to do a SELECT the table lock blocks even
this activity. Is this a bleeding lock? Shouldn't a simple SELECT
succeed? I dunno...but this is problematic as users are looking for
info while the data entry person is doing her thing...ouch.

Another bit of whining: in my PROGRESS dbs the user gets a NOTICE
when a table is LOCKED and his/her SELECT is on hold:
`tablename is in use by doofus on term/1a11...press CTRL-C or Wait'
Is there a way to implement this with pg?

Cheers,
Tom

----------- Sisters of Charity Medical Center ----------
Department of Psychiatry
----
Thomas Good, System Administrator <tomg(at)q8(dot)nrnet(dot)org>
North Richmond CMHC/Residential Services Phone: 718-354-5528
75 Vanderbilt Ave, Quarters 8 Fax: 718-354-5056
Staten Island, NY 10304 www.panix.com/~ugd
----
Powered by PostgreSQL 6.3.2 / Perl 5.004 / DBI-0.91::DBD-PG-0.69

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message pierre 1998-10-26 13:23:22 Alternate disks for Indexes
Previous Message Jan Wieck 1998-10-26 10:02:22 Re: [SQL] idiom to move records?