Re: Patch: show relation and tuple infos of a lock to acquire - Mailing list pgsql-hackers

From Christian Kruse
Subject Re: Patch: show relation and tuple infos of a lock to acquire
Date
Msg-id 20140101100058.GF25649@defunct.ch
Whole thread Raw
In response to Re: Patch: show relation and tuple infos of a lock to acquire  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
Hi,

On 31/12/13 13:56, Peter Geoghegan wrote:
> I think that this is a worthwhile effort, but like Tom I don't think
> that it's universally true that these waiters are waiting on a tuple
> lock. Most obviously, the XactLockTableWait() call you've modified
> within nbtinsert.c is not.

This is why I don't set the tuple data in this case:
    XactLockTableWaitSetupErrorContextCallback(rel, NULL);

The second argument is the tuple argument. If it is set to NULL in the
error context callback, all output regarding tuple are suppressed.

> ISTM that you should be printing just the value and the unique index
> there, and not any information about the tuple proper.

Good point, I will have a look at this.

> For better direction about where that new
> infrastructure ought to live, you might find some useful insight from
> commit 991f3e5ab3f8196d18d5b313c81a5f744f3baaea.

Thanks for the pointer!

But, to be honest, I am still unsure where to put this. As far as I
understand this commit has substantial parts in relcache.c and
elog.c – both don't seem to be very good fitting places?

Regards,

-- Christian Kruse               http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0
Next
From: Christian Kruse
Date:
Subject: Re: Patch: show relation and tuple infos of a lock to acquire