Re: pg_filedump 9.3: checksums (and a few other fixes)

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg_filedump 9.3: checksums (and a few other fixes)
Date: 2013-06-10 06:03:12
Message-ID: 1370844192.7746.32.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2013-06-10 at 01:28 -0400, Alvaro Herrera wrote:
> Hm, note that XMAX_SHR_LOCK is two bits, so when that flag is present
> you will get the three lock modes displayed with the above code, which is
> probably going to be misleading. htup_details.h does this:
>
> /*
> * Use these to test whether a particular lock is applied to a tuple
> */
> #define HEAP_XMAX_IS_SHR_LOCKED(infomask) \
> (((infomask) & HEAP_LOCK_MASK) == HEAP_XMAX_SHR_LOCK)
> #define HEAP_XMAX_IS_EXCL_LOCKED(infomask) \
> (((infomask) & HEAP_LOCK_MASK) == HEAP_XMAX_EXCL_LOCK)
> #define HEAP_XMAX_IS_KEYSHR_LOCKED(infomask) \
> (((infomask) & HEAP_LOCK_MASK) == HEAP_XMAX_KEYSHR_LOCK)
>
> Presumably it'd be better to do something similar.

I was hesitant to do too much interpretation of the bits. Do you think
it would be better to just remove the test for XMAX_SHR_LOCK?

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2013-06-10 06:06:05 Re: Optimising Foreign Key checks
Previous Message Alvaro Herrera 2013-06-10 05:28:10 Re: pg_filedump 9.3: checksums (and a few other fixes)