| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Subject: | Re: "page is not marked all-visible" warning in regression tests |
| Date: | 2012-06-07 13:20:50 |
| Message-ID: | CA+TgmoZMGT-+ciRRVkko3iUR0u5F=9waYm97d813z7ZrRmXCmg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jun 6, 2012 at 3:07 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> Hm. For a short while I thought there would be an issue with heap_delete and
> IOS because the deleting transaction can commit without any barriers happening
> on the IOS side. But that only seems to be possible with non MVCC snapshots
> which are currently not allowed with index only scans.
Well, one, commits are irrelevant; the page ceases to be all-visible
as soon as the delete happens. And two, you can't do a delete or a
commit without a memory barrier - every LWLockAcquire() or
LWLockRelease() is a full barrier, so any operation that requires a
buffer content lock is both preceded and followed by a full barrier.
Proposed patch attached. This adds some more comments in various
places, and implements your suggestion of retesting the visibility-map
bit when we detect a possible mismatch with the page-level bit.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| Attachment | Content-Type | Size |
|---|---|---|
| vm-test-cleanup.patch | application/octet-stream | 4.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2012-06-07 13:41:51 | Re: "page is not marked all-visible" warning in regression tests |
| Previous Message | Merlin Moncure | 2012-06-07 13:20:31 | Re: Early hint bit setting |