Maximize page freezing

From: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Maximize page freezing
Date: 2022-07-28 13:35:36
Message-ID: CANbhV-GLva4jC2v-Gd68AzDOYJgE6a1BjV=6z+fOZPRdYgyphg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Starting new thread with updated patch to avoid confusion, as
mentioned by David Steele on the original thread:
Original messageid: 20201118020418(dot)GA13408(at)alvherre(dot)pgsql
On Wed, 18 Nov 2020 at 02:04, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> On 2020-Nov-17, Simon Riggs wrote:
>
> > As an additional optimization, if we do find a row that needs freezing
> > on a data block, we should simply freeze *all* row versions on the
> > page, not just the ones below the selected cutoff. This is justified
> > since writing the block is the biggest cost and it doesn't make much
> > sense to leave a few rows unfrozen on a block that we are dirtying.
>
> Yeah. We've had earlier proposals to use high and low watermarks: if any
> tuple is past the high watermark, then freeze all tuples that are past
> the low watermark. However this is ancient thinking (prior to
> HEAP_XMIN_FROZEN) and we don't need the low watermark to be different
> from zero, since the original xid is retained anyway.
>
> So +1 for this idea.

Updated patch attached.

--
Simon Riggs http://www.EnterpriseDB.com/

Attachment Content-Type Size
one_freeze_then_max_freeze.v9.patch application/octet-stream 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-07-28 13:45:30 Re: small windows psqlrc re-wording
Previous Message Amit Kapila 2022-07-28 13:32:09 Re: Perform streaming logical transactions by background workers and parallel apply