Re: COPY FREEZE and PD_ALL_VISIBLE

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY FREEZE and PD_ALL_VISIBLE
Date: 2015-10-22 21:16:40
Message-ID: CA+Tgmob0y0eyBeMgn7b_RqVEnnb4HGXM3CuADXR-woub5pF5iA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 21, 2015 at 1:31 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-10-22 21:18:50 Re: Change behavior of (m)xid_age
Previous Message Robert Haas 2015-10-22 21:14:29 Re: clearing opfuncid vs. parallel query