[GENERAL] pg_locks: who is locking ?

2006-10-16 Thread Alexandre Arruda
Hi, My Database have a lot of locks not granted every moments in a day. Can I create a view that returns someting like this ? UserGranted Table Who_is_locking_me PID --- - - --- joe f foo frank 1212 jefff foo fra

Re: [GENERAL] pg_locks: who is locking ?

2006-10-16 Thread Alexandre Arruda
Alvaro Herrera escreveu: Alexandre Arruda wrote: Hi, My Database have a lot of locks not granted every moments in a day. Can I create a view that returns someting like this ? UserGranted Table Who_is_locking_me PID --- - - --- joe f foo

Re: [GENERAL] pg_locks: who is locking ? (SOLVED!)

2006-10-17 Thread Alexandre Arruda
Tom Lane wrote: Alexandre Arruda <[EMAIL PROTECTED]> writes: But pg_stat_activity joined with pg_locks only give me informations about the lock itself. Realy, I want a (possible) simple information: Who is locking me ? You need a self-join to pg_locks to find the matching lock that i

Re: [GENERAL] pg_dump & pg_restore suggestion

2006-07-24 Thread Alexandre Arruda
Hi, My wishlist for pg_{dump,restore} have only 1 item: 1) Thats "pg_restore -t file.bkp" returns not only the table, but the related PK and indexes, like "pg_dump -t makes with a operational database. If you drop a table from a database, this drops whole table and, obviously, your indexes. If