Обсуждение: locks..

Поиск
Список
Период
Сортировка

locks..

От
Anand Raman
Дата:
Hi guys
I am being faced with a persistent lock problem.. I am trying to insert
a single row in the exhibits table.. While using the psql interface the
following debug lines are getting generated..

query: insert into exhibits(exhibit_id,created_by,title,description,artist_id1,artist_id2) values (605,1001,'whats
happening',null,2,157);
ProcessQuery
query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"
query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"
query: SELECT oid FROM "atoday_users" WHERE "user_id" = $1 FOR UPDATE OF "atoday_users"
CommitTransactionCommand

HOwever when i use my web application (jdbc) i get the first 2 debug
lines and not the third.. This wasnt happening till now.. What could be
the reason.. The table is locked after this operation and all other
inserts fails either thru the web interface or the psql interface..

query: insert into exhibits(exhibit_id,created_by,title,description,artist_id1,artist_id2) values
(606,1001,'hello',null,2,196)
ProcessQuery
query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"
query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"


Can any one help me out with this.. Restaring the database is not
helping..

Postgres Server 7.0.2
Thanks
Anand


Re: locks..

От
Anand Raman
Дата:
hi guys,

as a further extension to the previous mail i tried vaccuming the
database..

The debug information generated mentioned this
NOTICE:  Index artists_name_key: NUMBER OF INDEX' TUPLES (213) IS NOT
THE SAME AS HEAP' (212).
Recreate the index.
failed sanity check, type with oid 437163 was not found
Password:
psql:/home/postgres/work/dumps/at_db_dump08-02-01.sql:4: ERROR:
RemoveType: type 'text4array' does not exist

The postgres server log also mentioned a problem with artists table..
Will recreating the table index help..

Anand

On Thu, Feb 08, 2001 at 01:36:21PM +0530, Anand Raman wrote:
>Hi guys
>I am being faced with a persistent lock problem.. I am trying to insert
>a single row in the exhibits table.. While using the psql interface the
>following debug lines are getting generated..
>
>query: insert into exhibits(exhibit_id,created_by,title,description,artist_id1,artist_id2) values (605,1001,'whats
happening',null,2,157);
>ProcessQuery
>query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"
>query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"
>query: SELECT oid FROM "atoday_users" WHERE "user_id" = $1 FOR UPDATE OF "atoday_users"
>CommitTransactionCommand
>
>HOwever when i use my web application (jdbc) i get the first 2 debug
>lines and not the third.. This wasnt happening till now.. What could be
>the reason.. The table is locked after this operation and all other
>inserts fails either thru the web interface or the psql interface..
>
>query: insert into exhibits(exhibit_id,created_by,title,description,artist_id1,artist_id2) values
(606,1001,'hello',null,2,196)
>ProcessQuery
>query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"
>query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"
>
>
>Can any one help me out with this.. Restaring the database is not
>helping..
>
>Postgres Server 7.0.2
>Thanks
>Anand
>