Re: Heavy write activity on first vacuum of fresh TOASTa

From: Matthew <matthew(at)flymine(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Heavy write activity on first vacuum of fresh TOASTa
Date: 2007-12-14 16:52:29
Message-ID: Pine.LNX.4.58.0712141648130.3731@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, 14 Dec 2007, Tom Lane wrote:
> Matthew <matthew(at)flymine(dot)org> writes:
> > Interesting thread. Now, I know absolutely nothing about how the data is
> > stored, but it strikes me as being non-optimal that every single block on
> > the disc needs to be written again just to update some hint bits. Could
> > those bits be taken out into a separate bitmap stored somewhere else?
>
> You are trying to optimize the wrong thing. Making vacuum cheaper at
> the cost of making every tuple lookup more expensive is not going to
> be a win.

True, although it depends how much data there actually is. If it's one bit
per page, then you could possibly rely on that data staying in the cache
enough for it to stop being a performance hit. If it's much more data than
that, then yes it's silly, and I should be embarrassed at having made the
suggestion. No point making each random tuple lookup into two disc
accesses instead of one.

Matthew

--
It is better to keep your mouth closed and let people think you are a fool
than to open it and remove all doubt. -- Mark Twain

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Joshua D. Drake 2007-12-14 17:04:33 Re: viewing source code
Previous Message Tom Lane 2007-12-14 16:22:49 Re: Heavy write activity on first vacuum of fresh TOASTa