Re: COPY FREEZE and PD_ALL_VISIBLE - Mailing list pgsql-hackers

From Robert Haas
Subject Re: COPY FREEZE and PD_ALL_VISIBLE
Date
Msg-id CA+Tgmob0y0eyBeMgn7b_RqVEnnb4HGXM3CuADXR-woub5pF5iA@mail.gmail.com
Whole thread Raw
In response to Re: COPY FREEZE and PD_ALL_VISIBLE  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: COPY FREEZE and PD_ALL_VISIBLE  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Wed, Oct 21, 2015 at 1:31 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> It turns out it was pretty easy to set PD_ALL_VISIBLE on the new pages,
> since the code in hio that requests the relation to be extended already has
> info on the tuple's intended freeze status.
>
> Then you just need to refrain from clearing PD_ALL_VISIBLE when that tuple
> is actually written into the page.  Not only because clearing would defeat
> the purpose, but also because it will cause an error--apparently the
> incipient page is not yet in a state where visibilitymap_clear is willing to
> deal with it.

Wouldn't it be better to instead fill the page with tuples first and
THEN set PD_ALL_VISIBLE?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Getting sorted data from foreign server
Next
From: Robert Haas
Date:
Subject: Re: Change behavior of (m)xid_age