What is locktype=transactionid ?

Поиск
Список
Период
Сортировка
От Tony Day
Тема What is locktype=transactionid ?
Дата
Msg-id AANLkTilPdbYzehxUQc7652faXxXZ4_AzedFZlQiz1lRH@mail.gmail.com
обсуждение исходный текст
Ответы Re: What is locktype=transactionid ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hi

[Apologies for the long lines - not sure how to format them better]

I have a process that is waiting for a lock and the locktype of the lock is "transactionid".

Despite a fair bit of googling I have been unable to find more information on this type of lock.

Here are the relevant rows from pg_locks:

   locktype    | database | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction |  pid  |     mode      | granted
---------------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+-------+---------------+---------
 transactionid |          |          |      |       |            |      83827390 |         |       |          | 5/153427           | 20128 | ExclusiveLock | t
 transactionid |          |          |      |       |            |      83827390 |         |       |          | 8/171365           | 20289 | ShareLock     | f

And here are the relevant rows from pg_stat_activity:

 client_addr | client_port |       age       |  datid  |      datname      | procpid | usesysid | usename  |                            current_query                             | waiting |          xact_start           |          query_start          |         backend_start         | client_addr | client_port
-------------+-------------+-----------------+---------+-------------------+---------+----------+----------+----------------------------------------------------------------------+---------+-------------------------------+-------------------------------+-------------------------------+-------------+-------------
 127.0.0.1   |       40926 | 05:28:08.349825 | 1569605 | nova_experimental |   20128 |       10 | postgres | <IDLE> in transaction                                                | f       | 2010-05-17 22:12:15.083799+00 | 2010-05-17 22:12:15.90937+00  | 2010-05-17 22:10:00.024239+00 | 127.0.0.1   |       40926
 127.0.0.1   |       36054 | 05:28:08.345873 | 1569605 | nova_experimental |   20289 |       10 | postgres |               UPDATE "users"                                         | t       | 2010-05-17 22:12:15.122643+00 | 2010-05-17 22:12:15.913322+00 | 2010-05-17 22:10:31.817664+00 | 127.0.0.1   |       36054
                                                                                                           :               SET "lock_version" = 2955, "previous_passwords" = NULL                                                                                                                          
                                                                                                           :               WHERE id = 185                                                                                                                                                                  
                                                                                                           :               AND "lock_version" = 2954                                                                                                                                                       
                                                                                                           :                                                                                                                                                                                               


Can anybody point me to where I can find more information?


I am using PostgreSQL 8.3.9 on Ubuntu 9.04


Thanks

Regards, Tony

В списке pgsql-novice по дате отправления:

Предыдущее
От: Mladen Gogala
Дата:
Сообщение: Re: Bulk Insert
Следующее
От: Tom Lane
Дата:
Сообщение: Re: What is locktype=transactionid ?