Re: Patch: show relation and tuple infos of a lock to acquire

From: Christian Kruse <christian(at)2ndquadrant(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: show relation and tuple infos of a lock to acquire
Date: 2014-01-01 10:00:59
Message-ID: 20140101100058.GF25649@defunct.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christian Kruse 2014-01-01 10:04:33 Re: Patch: show relation and tuple infos of a lock to acquire
Previous Message Amit Kapila 2014-01-01 05:12:23 Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0