From: | Roelof Osinga <roelof(at)eboa(dot)com> |
---|---|
To: | "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it> |
Cc: | questions postgres <pgsql-questions(at)postgreSQL(dot)org>, hackers postgres <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [QUESTIONS] locks |
Date: | 1998-05-11 20:06:49 |
Message-ID: | 35575A59.886FC208@eboa.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jose' Soares Da Silva wrote:
>
> Hi all,
>
> After almost one year using PostgreSQL, I'm still discovering things about
> locks, we have little documentation about it:
>
> I know that one can lock a table in the following ways:
>
> * BEGIN statement:
> If you don't explicit lock a table using LOCK statement, it will be
> implicit locked only at first UPDATE, INSERT or DELETE operation.
>
> * DECLARE statement:
> Currently, PostgreSQL doesn't support READ ONLY cursors, once a cursor
> is declared, other users can only read data referenced by cursor.
> Write operations to the referenced table like UPDATE, INSERT,
> DELETE or DROP aren't allowed until the end of transaction.
>
> * LOCK statement:
> LOCK don't allows read access to locked tables by the other users.
> If another user try to SELECT a locked table, he must attend
> until the locked table is released.
>
> Just wondering if there are other ways to lock tables.
> Any replay will be appreciate. Thanks, Jose'
>
I believe it to be so that BEGIN locks each table when it first
occurs in a statement. With multiple statements per transaction
this may lead to a deadlock.
Roelof
----------------------------------------------------------------
Home is where the http://eboa.com/ is.
----------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | ocie | 1998-05-11 20:54:26 | Re: [HACKERS] Is there any way to check the status of the Index table. |
Previous Message | David Hartwig | 1998-05-11 19:20:58 | Group/Order by not in target - Was [NEW ODBC DRIVER] |