From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Christian Kruse <christian(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch: show relation and tuple infos of a lock to acquire |
Date: | 2014-03-18 16:12:21 |
Message-ID: | CA+TgmoZiwUSn0DBWvYoP-198woNiVKKLHHXEZSmuDTX+Mx8isA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 18, 2014 at 11:59 AM, Greg Stark <stark(at)mit(dot)edu> wrote:
> On Tue, Mar 18, 2014 at 3:42 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> The message for exclusive lock on tuple print the database information.
>
> It is true that it is possible to have a deadlock or lock chains that
> involves locks on other databases.
> In this example the table "test" is not in the database that just
> logged the deadlock.
>
> STATEMENT: create role test;
> ERROR: deadlock detected
> DETAIL: Process 8968 waits for ShareLock on transaction 1067; blocked
> by process 8973.
> Process 8973 waits for ShareLock on transaction 1064; blocked
> by process 8971.
> Process 8971 waits for ShareLock on transaction 1062; blocked
> by process 8968.
> Process 8968: create role test;
> Process 8973: insert into test values (2);
> Process 8971: create role test2;
This is a good point, but I think it's acceptable to leave out the
database name as Tom proposes. The context message applies to what
the current backend was doing when the message got printed, and that's
always relative to the current database.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-03-18 16:15:26 | Re: Patch: show relation and tuple infos of a lock to acquire |
Previous Message | Robert Haas | 2014-03-18 16:04:50 | Re: Portability issues in shm_mq |