Re: Optimization for lazy_scan_heap

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Optimization for lazy_scan_heap
Date: 2016-09-05 09:27:53
Message-ID: CANP8+jLj0xN-3VgYaZfbg-XbtFU=9u=qXS+RhycGk5o7NrPMJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4 August 2016 at 05:57, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:

> While reviewing freeze map code, Andres pointed out[1] that
> lazy_scan_heap could accesses visibility map twice and its logic is
> seems a bit tricky.
> As discussed before, it's not nice especially when large relation is
> entirely frozen.
>
> I posted the patch for that before but since this is an optimization,
> not bug fix, I'd like to propose it again.
> Please give me feedback.
>
> [1] https://www.postgresql.org/message-id/20160505000840.epatoq6d2e556446%40alap3.anarazel.de

If we have a freeze map now, surely tables will no longer be entirely frozen?

What performance difference does this make, in a realistic use case?

How would we test this to check it is exactly correct?

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-09-05 09:28:02 Re: [PATCH] Send catalog_xmin separately in hot standby feedback
Previous Message Amit Kapila 2016-09-05 09:27:19 Re: Speed up Clog Access by increasing CLOG buffers