pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: fred@redhotpenguin.com
To: pgsql-performance@postgresql.org
Subject: Re: Scaling with lazy index updates
Date: Sat, 17 Jul 2004 17:02:20 -0700
Message-ID: <200407171702.20997.josh@agliodbs.com> (raw)
In-Reply-To: <33721.67.116.52.35.1090035034.squirrel@mail.redhotpenguin.com>
References: <33721.67.116.52.35.1090035034.squirrel@mail.redhotpenguin.com>

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




view thread (2+ messages)

Message-ID: <200407171702.20997.josh@agliodbs.com>
Permalink:  ../200407171702.20997.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200407171702.20997.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: josh@agliodbs.com, fred@redhotpenguin.com
  Subject: Re: Scaling with lazy index updates
  In-Reply-To: <200407171702.20997.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox