Re: Concurrent HOT Update interference

From: Greg Stark <stark(at)mit(dot)edu>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Concurrent HOT Update interference
Date: 2013-05-10 14:47:52
Message-ID: CAM-w4HNY8XS+yeTB-AKfvJR8tthCemmNcfd-z4hZfqzt16hB8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 10, 2013 at 3:04 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> a) Updating two separate rows that happen to be on the same block will
> eventually cause one or both of the rows to migrate to separate blocks
> because of 1) the inability to clean the existing block and 2) the way
> our fsm algorithm gives you a clean new block away from other people.
> That leads to a one-block-per-row situation, or in other words quite
> bad bloating, which seems to be avoidable, hence this thread.

This seems like a good behaviour to me. If you have N busy rows then
having each row in its own block minimizes contention and minimizes
the frequency of cleanups. You can't be both worried about bloating
*and* contention -- either you have relatively few busy rows per
processor in which case the bloat is minor and the contention is an
issue or you have many rows in which case the contention can't be an
issue and the bloat becomes important.

--
greg

--
Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2013-05-10 14:50:49 Re: [PATCH] Make "psql -1 < file.sql" work as with "-f"
Previous Message Merlin Moncure 2013-05-10 14:04:34 Re: Concurrent HOT Update interference