Re: [TLM] Re: How to insert on duplicate key?

From: "Trevor Talbot" <quension(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>, "Samantha Atkins" <sjatkins(at)mac(dot)com>, "Greg Smith" <gsmith(at)gregsmith(dot)com>, "fdu(dot)xiaojf(at)gmail(dot)com" <fdu(dot)xiaojf(at)gmail(dot)com>
Subject: Re: [TLM] Re: How to insert on duplicate key?
Date: 2007-12-28 22:30:48
Message-ID: 90bce5730712281430g1b85ab5au41ff1d34187a24b8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/28/07, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> wrote:
> On Thursday 27 December 2007 12:23, Samantha Atkins wrote:

> > Since it is known to be dead
> > is it automatically removed when there are no live transaction that
> > reference or may reference it and its data page space marked available
> > for new rows? If not, why not? I'm dredging my mind for stuff from
> > my RDBMS implementation grad course a very long time ago.

> The problem is you have determined in your mind that a row is "known dead"
> without explination of how that would actually be determined. A given
> transaction doesn't have a way to determine if there are live transaction
> looking at the row, that would require quite a bit of knowledge about what
> else is occuring in the system to be able to determine that. That level of
> knowledge/complexity is what vacuum takes care of.

If you're familiar with the intricacies of the garbage collection vs
realloc/free debate surrounding programming languages, especially in
multithreaded environments, this is basically the same thing applied
to disk storage. PostgreSQL implements garbage collection. Its methods
for doing it automatically are still being refined, hence the advice
on manual tuning for specific workloads.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message O'Shea, Brendan 2007-12-28 22:43:17 ERROR: catalog is missing 9 attribute(s) for relid 10297
Previous Message Robert Treat 2007-12-28 21:04:51 Re: [TLM] Re: How to insert on duplicate key?