pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: cjwhite@cisco.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Duplicate indexes found in the postgres Database
Date: Thu, 06 Feb 2003 10:05:59 -0500
Message-ID: <12347.1044543959@sss.pgh.pa.us> (raw)
In-Reply-To: <00d401c2cd66$92583dd0$ff926b80@amer.cisco.com>
References: <00d401c2cd66$92583dd0$ff926b80@amer.cisco.com>

"Chris White" <cjwhite@cisco.com> writes:
> User was able to recreate the problem, but this time only on table got
> duplicated 'gui_config'. So here is the info you wanted:

> select ctid,xmin,xmax,oid,* from pg_class where relname = 'gui_config';
>   ctid  | xmin | xmax |  oid  |  relname   | reltype | relowner | relam |
> relfilenode | relpages | reltuples | reltoastrelid | reltoastidxid |
> relhasindex | relisshared | relkind | relnatts | relchecks | reltriggers |
> relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules |
> relhassubclass |        relacl
> --------+------+------+-------+------------+---------+----------+-------+---
> ----------+----------+-----------+---------------+---------------+----------
> ---+-------------+---------+----------+-----------+-------------+----------+
> ----------+---------+------------+------------+-------------+---------------
> -+-----------------------
>  (2,54) |  176 |  191 | 16560 | gui_config |   16561 |      101 |     0 |
> 16560 |       10 |      1000 |             0 |             0 | t           |
> f           | r       |        2 |         0 |           0 |        0 |
> 0 |       0 | t          | t          | f           | f              |
> {=,aesop_gui=arwdRxt}
>  (2,56) |  191 |  206 | 16560 | gui_config |   16561 |      101 |     0 |
> 16560 |       10 |      1000 |             0 |             0 | t           |
> f           | r       |        2 |         0 |           0 |        0 |
> 0 |       0 | t          | t          | f           | f              |
> {=,aesop_gui=arwdRxt}
> (2 rows)

Hmm ... this looks much like the duplicate-tuple issues we were looking
at last month.  Transaction 191 tried to update the row (though it's not
clear why, since none of the fields seem to have changed).  But only one
of the two rows should be considered good --- either 191 committed or it
didn't.  Something's gotten out of sync between the pg_class table file
and the pg_clog transaction commit status data.  The only known ways for
that to happen involve system crashes just after a checkpoint, or pilot
error like trying to use a "tar" dump of an active database as a backup.

Is this a freshly-initdb'd database?  Transaction number 191 seems very
small.

Do you have a procedure to reproduce the problem?  Can you at least
describe what your user did?

			regards, tom lane



view thread (8+ messages)

Message-ID: <12347.1044543959@sss.pgh.pa.us>
Permalink:  ../12347.1044543959@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12347.1044543959@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, cjwhite@cisco.com
  Subject: Re: Duplicate indexes found in the postgres Database
  In-Reply-To: <12347.1044543959@sss.pgh.pa.us>
  References: <00d401c2cd66$92583dd0$ff926b80@amer.cisco.com> <12347.1044543959@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