Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Savoir qui lock


  • From: Xavier Poinsard <xpoinsard(at)free(dot)fr>
  • To: c(dot)maumont(at)univitis(dot)fr
  • Cc: pgsql-fr-generale(at)postgresql(dot)org
  • Subject: Re: Savoir qui lock
  • Date: Mon, 19 Dec 2005 12:06:28 +0100
  • Message-id: <43A69434(dot)7070403(at)free(dot)fr>

Stephane BUNEL a écrit :
> c(dot)maumont(at)univitis(dot)fr a écrit :
> 
>>
>> Bonjour,
>>
>>
>> C'est peut-être trivial, mais j'ai rien trouvé là dessus :
>>
>> Est-il possible de savoir, avec PG 8, qui lock un enregistrement 
>> donné , le PID, le poste, une zone dans une table système ... Quelque
>> chose qui me permettrait de dire à l'utilisateur bloqué que c'est
>> untel (ou lui même) qui a lancé un traitement bloquant ou qui n'a pas
>> encore validé une transaction.
> 
> 
> La documentation de PG 8.0 propose les liens suivants :
> 
> http://www.postgresql.org/docs/8.0/static/monitoring-locks.html
> http://www.postgresql.org/docs/8.0/static/view-pg-locks.html

Ce qui permet d'écrire une requête

select c.relname,l.mode,l.granted,l.pid from pg_class c, pg_locks l
where c.oid = l.relation;


> 
> Stéphane BUNEL.
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>       message can get through to the mailing list cleanly




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group