Re: Turning off HOT/Cleanup sometimes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Turning off HOT/Cleanup sometimes
Date: 2014-09-19 18:04:39
Message-ID: CA+TgmoZmpjYQvV=y13iCyOO9Af5F4A+t9Mep8Synokn0Nv=BQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 15, 2014 at 5:13 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 15 September 2014 17:09, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Do we really want to disable HOT for all catalog scans?
>
> The intention of the patch is that catalog scans are treated
> identically to non-catalog scans. The idea here is that HOT cleanup
> only occurs on scans on target relations, so only INSERT, UPDATE and
> DELETE do HOT cleanup.
>
> It's possible that many catalog scans don't follow the normal target
> relation logic, so we might argue we should use HOT every time. OTOH,
> since we now have separate catalog xmins we may find that using HOT on
> catalogs is no longer effective. So I could go either way on how to
> proceed; its an easy change either way.

What I'm thinking about is that the smarts to enable pruning is all in
the executor nodes. So anything that updates the catalog without
going through the executor will never be subject to pruning. That
includes nearly all catalog-modifying code throughout the backend.

--
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 Andres Freund 2014-09-19 18:05:14 Re: removing volatile qualifiers from lwlock.c
Previous Message Andrew Gierth 2014-09-19 18:04:11 Re: Final Patch for GROUPING SETS