pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Neil Conway <neilc@samurai.com>
To: Andrew McMillan <andrew@catalyst.net.nz>
Cc: Evilio del Rio <edelrio@cmima.csic.es>
Cc: dspam-users@networkdweebs.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres vs. DSpam
Date: Fri, 26 Nov 2004 14:25:25 +1100
Message-ID: <1101439525.12697.11.camel@localhost.localdomain> (raw)
In-Reply-To: <1101433032.16058.57.camel@lamb.mcmillan.net.nz>
References: <1101302058.338.74.camel@haddock.cmima.csic.es>
	<1101433032.16058.57.camel@lamb.mcmillan.net.nz>

On Fri, 2004-11-26 at 14:37 +1300, Andrew McMillan wrote:
> In PostgreSQL the UPDATE will result
> internally in a new record being written, with the old record being
> marked as deleted.  That old record won't be re-used until after a
> VACUUM has run, and this means that the on-disk tables will have a lot
> of dead rows in them quite quickly.

Not necessarily: yes, you need a VACUUM to begin reusing the space
consumed by expired tuples, but that does not mean "tables will have a
lot of dead rows in them quite quickly". VACUUM does not block
concurrent database activity, so you can run it as frequently as you'd
like (and as your database workload requires). There is a tradeoff
between the space consumed by expired tuple versions and the I/O
required to do a VACUUM -- it's up to the PG admin to decide what the
right balance for their database is (pg_autovacuum et al. can help make
this decision).

> The reason that PostgreSQL operates this way, is a direct result of the
> way transactional support is implemented, and it may well change in a
> version or two.

I doubt it.

-Neil





view thread (3+ messages)  latest in thread

Message-ID: <1101439525.12697.11.camel@localhost.localdomain>
Permalink:  ../1101439525.12697.11.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1101439525.12697.11.camel@localhost.localdomain

 · 

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: neilc@samurai.com, andrew@catalyst.net.nz, edelrio@cmima.csic.es, dspam-users@networkdweebs.com
  Subject: Re: Postgres vs. DSpam
  In-Reply-To: <1101439525.12697.11.camel@localhost.localdomain>

* 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