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

From: Christian Kruse <christian(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-11 09:02:39
Message-ID: 20140311090239.GD9524@defunct.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 11/03/14 13:23, Amit Kapila wrote:
> [… snip …]
> So I think it's better to leave logging it as you have done in
> patch.

Agreed.

> […]
> 2. Name new functions as MultiXactIdWaitExtended()/XactLockTableWaitExtended()
> or MultiXactIdWaitEx()/XactLockTableWaitEx().
> You can find some other similar functions (ReadBufferExtended,
> relation_openrv_extended)
>
> 3. MultiXactIdWaitWithInfo()/XactLockTableWaitWithInfo()
>
> Earlier I found option 3 as a good choice, but now again thinking on
> it I am leaning towards option 2.

Changing it once again will only cause more work and won't do a big
difference. So I suggest sticking with the current function names.

> Today, again looking into it, I found that function
> heap_lock_updated_tuple_rec() is using SnapshotAny to fetch the tuple
> and I think for this case also it's not safe to Log the tuple.
>
> Could you please once check (if you are comfortable doing so) wherever
> this patch is passing tuple, whether it is okay to pass it based on visibility
> rules, else I will again verify it once.

I think I got all places, but it would be nice to have a confirmation.

> > [… policy regarding whitespaces …]
> The simple rule I follow is don't touch the code which has no relation
> to current patch.

OK. Thanks.

Best regards,

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

Attachment Content-Type Size
show_table_name_and_tuple_in_lock_log_v8.patch text/x-diff 12.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rajeev rastogi 2014-03-11 10:28:10 Re: COPY table FROM STDIN doesn't show count tag
Previous Message Amit Kapila 2014-03-11 07:53:42 Re: Patch: show relation and tuple infos of a lock to acquire