visibility maps

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: visibility maps
Date: 2008-12-05 07:10:10
Message-ID: 2e78013d0812042310o1a5352d8h693e387e6ef00ce9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

/*
* We don't need to lock the page, as we're only looking at a single
bit.
*/
result = (map[mapByte] & (1 << mapBit)) ? true : false;

Isn't this a dangerous assumption to make ? I am not so sure that even a bit
can be read atomically on all platforms. I think the only caller of
visibilitymap_test() is VACUUM which can live with a false information. But
if this is indeed a problem, should we either fix this or have explicit
comments there ?

BTW, my apologies for random comments. I haven't followed the discussion
well, neither done a full review. So these things might have been discussed
before.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2008-12-05 07:25:17 Re: visibility maps
Previous Message Fujii Masao 2008-12-05 07:00:28 Re: Sync Rep: First Thoughts on Code