pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Phill Kenoyer <pgsql@c0de.net>
To: Glen Eustace <geustace@godzone.net.nz>
Cc: pgsql-admin@postgresql.org
Subject: Re: Primary Key Problems
Date: Tue, 18 Dec 2001 19:56:32 -0500
Message-ID: <19852.1008723392@sss.pgh.pa.us> (raw)
In-Reply-To: <20011208040643.GD2913@c0de.net>
References: <20011208014433.GA2913@c0de.net>
	<200112080246.DAA20030@post.webmailer.de>
	<20011208040643.GD2913@c0de.net>

Phill and Glen,

We've just tracked down one mechanism that allows duplicate rows to be
spawned --- see http://fts.postgresql.org/db/mw/msg.html?mid=1078374
and following discussion.  In the example given by Brian Hirt, VACUUM's
creation of a duplicate row causes a unique-key violation to be
reported, but I think if he'd made the indexes in the other order,
the error would go undetected, leaving duplicate rows in the table.

What I'm currently puzzling over is whether this bug explains your
recent problem reports, or whether there are still more bugs lurking.

The bug is actually fairly general: checking the validity of a tuple
while a VACUUM is in process on the table can lead to the tuple being
marked good when it shouldn't be.  But I do not currently see any way
to trigger the bug other than the one Brian reported, namely creating
a functional index with a function that tries to scan its own table.

Neither of you mentioned having done any such thing in your reports,
but I wonder whether you'd ever had such an index on the tables that
you saw problems with.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <19852.1008723392@sss.pgh.pa.us>
Permalink:  ../19852.1008723392@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19852.1008723392@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql@c0de.net, geustace@godzone.net.nz
  Subject: Re: Primary Key Problems
  In-Reply-To: <19852.1008723392@sss.pgh.pa.us>
  References: <20011208014433.GA2913@c0de.net> <200112080246.DAA20030@post.webmailer.de> <20011208040643.GD2913@c0de.net> <19852.1008723392@sss.pgh.pa.us>

* 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