Re: "page is not marked all-visible" warning in regression tests

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(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 16:19:38
Message-ID: 201206071819.38467.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, June 07, 2012 06:08:34 PM Robert Haas wrote:
> On Thu, Jun 7, 2012 at 11:04 AM, Andres Freund <andres(at)2ndquadrant(dot)com>
wrote:
> > On Thursday, June 07, 2012 04:27:32 PM Robert Haas wrote:
> >> On Thu, Jun 7, 2012 at 9:41 AM, Andres Freund <andres(at)2ndquadrant(dot)com>
> >
> > wrote:
> >> >> 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.
> >> >
> >> > Thanks, will look at it in a bit.
> > The visibilitymap_clear/PageClearAllVisible in heap_multi_insert should
> > be moved into the critical section, shouldn't it?
>
> Yes, it should. I was thinking maybe we could go the other way and
> have heap_insert do it before starting the critical section, but
> that's no good: clearing the visibility map bit is part of the
> critical data change, and we can't do it and then forget to WAL-log
> it.
You could do a visibilitymap_pin outside, but I don't really see the point as
the page is already locked. There might be some slight benefit in doing so in
multi_insert but that would be more complicated. And of doubtful benefit.

> Updated patch attached.
Looks good.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-06-07 16:20:32 Re: Ability to listen on two unix sockets
Previous Message Robert Haas 2012-06-07 16:14:55 Re: Ability to listen on two unix sockets