Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.
Дата
Msg-id CAA4eK1LaHo_85uHRtAscYNTbw6ZjZFy0tFdD7tCzXVEtxDnUwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.
Список pgsql-hackers
On Wed, Jan 4, 2023 at 12:16 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> It seems to be confusing and the user won't get the result even if
> they search it by transactionid = 741. So I've attached the patch to
> fix it. With the patch, the pg_locks views shows like:
>
>  locktype  | database | relation | page | tuple | virtualxid |
> transactionid | classid | objid | objsubid | virtualtransaction |  pid
>   |     mode      | granted | fastpath | waitstart
>
-----------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+--------+---------------+---------+----------+-----------
>  spectoken |          |          |      |       |            |
>   746 |         |     1 |          | 3/4                | 535618 |
> ExclusiveLock | t       | f        |
> (1 row)
>

Is it a good idea to display spec token as objid, if so, how will
users know? Currently for Advisory locks, we display values in
classid, objid, objsubid different than the original meaning of fields
but those are explained in docs [1]. Wouldn't it be better to mention
this in docs?

[1] - https://www.postgresql.org/docs/devel/view-pg-locks.html

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
Следующее
От: vignesh C
Дата:
Сообщение: Re: Parallelize correlated subqueries that execute within each worker