From: | "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> |
---|---|
To: | "Zdenek Kotala" <Zdenek(dot)Kotala(at)sun(dot)com> |
Cc: | "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: visibility maps |
Date: | 2008-12-11 13:24:18 |
Message-ID: | 2e78013d0812110524k27c6e00fhb8e35d24e77ca0a4@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 11, 2008 at 5:01 PM, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com> wrote:
>
>>
>
> IIRC, Memory reading/writing is atomic operation. Only one CPU(hw thread)
> can access to the same memory address(es)* in same time*. The question is
> how compiler compile C code to assembler. But this code seems to me safe.
Yeah, I think the code is safe because we are just reading a bit.
BTW, I wonder if we need to acquire EXCLUSIVE lock while writing the
visibility map bit ? Since almost (8 * 8192) data blocks would map to
the same visibility map page, the lock can certainly become a hot
spot. I know we also update PageLSN during the set operation and that
would require EXLUSIVE lock, but is that required for consistency
given that the entire visibility map is just a hint ?
Thanks,
Pavan
--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-12-11 13:28:08 | Re: Refactoring SearchSysCache + HeapTupleIsValid |
Previous Message | Dmitry Turin | 2008-12-11 13:20:21 | Re: COCOMO & Indians |