Re: Turning off HOT/Cleanup sometimes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Turning off HOT/Cleanup sometimes
Date
Msg-id 14100.1389293664@sss.pgh.pa.us
Whole thread Raw
In response to Re: Turning off HOT/Cleanup sometimes  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Turning off HOT/Cleanup sometimes  (Jim Nasby <jim@nasby.net>)
Re: Turning off HOT/Cleanup sometimes  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> That said, I'm not entirely convinced that traversing these dead tuples
> is all *that* painful during SELECT.  If there's that many levels then
> hopefully it's not long til an UPDATE comes along and cleans them up.

There's always VACUUM ;-)

If you take about ten steps back, what's happening here is that
maintenance work that we'd originally delegated to VACUUM, precisely so
that it wouldn't have to be done by foreground queries, is now being done
by foreground queries.  And oddly enough, people don't like that.

There is a reasonable argument for forcing UPDATE queries to do it anyway,
to improve the odds they can do same-page updates (whether HOT or
otherwise).  And probably an INSERT should do it on a page that it's
selected as an insertion target.  But I think the argument that the
original do-maintenance-in-background-whenever-possible design was wrong
is a lot harder to sustain for SELECT or even DELETE queries.  As I said
upthread, I think the current behavior was *not* chosen for performance
reasons but just to limit the scope of what we had to change for HOT.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Turning off HOT/Cleanup sometimes
Next
From: Amit Kapila
Date:
Subject: Re: [ANNOUNCE] IMCS: In Memory Columnar Store for PostgreSQL