pgsql: Fix COPY FREEZE with CLOBBER_CACHE_ALWAYS

From: Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix COPY FREEZE with CLOBBER_CACHE_ALWAYS
Date: 2021-01-24 00:26:24
Message-ID: E1l3TEW-0007of-70@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix COPY FREEZE with CLOBBER_CACHE_ALWAYS

This adds code omitted from commit 7db0cd2145 by accident, which had
two consequences. Firstly, only rows inserted by heap_multi_insert were
frozen as expected when running COPY FREEZE, while heap_insert left
rows unfrozen. That however includes rows in TOAST tables, so a lot of
data might have been left unfrozen. Secondly, page might have been left
partially empty after relcache invalidation.

This addresses both of those issues.

Discussion: https://postgr.es/m/CABOikdN-ptGv0mZntrK2Q8OtfUuAjqaYMGmkdU1dCKFtUxVLrg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/39b66a91bdebb00af71a2c6218412ecfc89a0e13

Modified Files
--------------
src/backend/access/heap/heapam.c | 78 +++++++++++++++++++++++++++++++++++++++-
src/backend/access/heap/hio.c | 22 ++++++------
2 files changed, 88 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-01-24 03:40:54 pgsql: Doc: clean up contrib/pageinspect's GIST function documentation.
Previous Message Noah Misch 2021-01-23 22:21:14 pgsql: Make check-prepared-txns use temp-install binaries.