Re: Scaling with lazy index updates

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: fred(at)redhotpenguin(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Scaling with lazy index updates
Date: 2004-07-18 00:02:20
Message-ID: 200407171702.20997.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Howdy Fred,

> This might be a out of the ordinary question, or perhaps I have been out
> of the loop for a while but does PostgreSQL (or any other database) have
> support for lazy index updates. What I mean by lazy index updates is
> index updating which occur at a regular interval rather than per
> transaction.

In a word: No.

The issue with "asynchronous index updates" (which is what you asked about) is
that they don't work with the way PostgreSQL uses indexes. If the index
hasn't been updated, then when a query uses an index scan the row simply
wouldn't show up. If that's acceptable behavior for you, then perhaps you
could consider asynchronous *table* updates, done at the application layer,
which would be much easier to implement.

We do as much as we can by offloading b-tree "cleanup" for indexes until
VACUUM/REINDEX, which is called manually.

Hmmm. Can you think of an example of an RDBMS which does *not* update
indexes immediately (and transactionally)? I can't.

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Gaetano Mendola 2004-07-18 09:42:36 Re: High load average with PostgreSQL 7.4.2 on debian/ibm eserver.
Previous Message Tom Lane 2004-07-17 04:43:04 Re: same plan, different time