Re: FSM search modes

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "decibel" <decibel(at)decibel(dot)org>, "Itagaki Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: FSM search modes
Date: 2009-10-01 21:23:52
Message-ID: 4AC4D798020000250002B57B@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> The elephant in the room here is that if the relation is a million
> pages of which 1-100,000 and 1,000,000 are in use, no amount of bias
> is going to help us truncate the relation unless every tuple on page
> 1,000,000 gets updated or deleted.

Perhaps bias, combined with a client utility to force non-HOT updates
of some rows at the end of the table would provide the desired
behavior. (It'd be nice if that could be built in to vacuum, but if
it's not feasible, a separate utility is workable.) Off the top of my
head, I might set up a routine crontab job for most databases to do
that to the lesser of 1% of the rows or a number of rows which matches
how far the pages with free space exceed 10% of total pages. That
seems like it should contain things for most circumstances without
getting too extreme. One could always run the utility manually to
correct more extreme bloat.

Some sort of delay (similar to what vacuum can do) to prevent tanking
performance would be good. We wouldn't care about the occasional
update conflict -- we expect that using a relational database means
dealing with serialization failures. We'd be more than happy to
accept a few of these in exchange for keeping performance optimal. If
your software is designed to reschedule transactions which are rolled
back for serialization failures, they are just another performance
cost, so it's pretty easy to balance one cost against another.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2009-10-01 22:02:28 Re: FSM search modes
Previous Message Alvaro Herrera 2009-10-01 21:22:06 Re: TODO item: Allow more complex user/database default GUC settings