pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE
Date: Sun, 17 Jan 2021 21:30:49 +0000
Message-ID: <E1l1FdJ-0002zh-JQ@gemulon.postgresql.org> (raw)

Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE

Make sure COPY FREEZE marks the pages as PD_ALL_VISIBLE and updates the
visibility map. Until now we only marked individual tuples as frozen,
but page-level flags were not updated, so the first VACUUM after the
COPY FREEZE had to rewrite the whole table.

This is a fairly old patch, and multiple people worked on it. The first
version was written by Jeff Janes, and then reworked by Pavan Deolasee
and Anastasia Lubennikova.

Author: Anastasia Lubennikova, Pavan Deolasee, Jeff Janes
Reviewed-by: Kuntal Ghosh, Jeff Janes, Tomas Vondra, Masahiko Sawada,
             Andres Freund, Ibrar Ahmed, Robert Haas, Tatsuro Ishii,
             Darafei Praliaskouski
Discussion: https://postgr.es/m/CABOikdN-ptGv0mZntrK2Q8OtfUuAjqaYMGmkdU1dCKFtUxVLrg@mail.gmail.com
Discussion: https://postgr.es/m/CAMkU%3D1w3osJJ2FneELhhNRLxfZitDgp9FPHee08NT2FQFmz_pQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7db0cd2145f2bce84cac92402e205e4d2b045bf2

Modified Files
--------------
contrib/pg_visibility/expected/pg_visibility.out | 64 ++++++++++++++++++++
contrib/pg_visibility/sql/pg_visibility.sql      | 77 ++++++++++++++++++++++++
src/backend/access/heap/heapam.c                 | 77 +++++++++++++++++++++---
src/backend/access/heap/hio.c                    | 17 ++++++
src/include/access/heapam_xlog.h                 |  3 +
5 files changed, 230 insertions(+), 8 deletions(-)



Message-ID: <E1l1FdJ-0002zh-JQ@gemulon.postgresql.org>
Permalink:  ../E1l1FdJ-0002zh-JQ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1l1FdJ-0002zh-JQ@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE
  In-Reply-To: <E1l1FdJ-0002zh-JQ@gemulon.postgresql.org>
  References: <E1l1FdJ-0002zh-JQ@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox