The ctids are different however vaccum is run on this table and the record
is updated.
The machineid is a SERIAL and so should also never be duplicated.

  ctid  |   oid   | machineid
--------+---------+-----------
 (7,18) | 9646238 |        12
 (7,10) | 9646238 |        12


Any help as usual is greatly appreciated.
-----Original Message-----
From: Hannu Krosing [mailto:hannu@tm.ee]
Sent: 13 December 2002 11:54
To: Steve King
Cc: 'pgsql-hackers@postgresql.org'
Subject: Re: [HACKERS] FW: Duplicate oids!


On Fri, 2002-12-13 at 09:27, Steve King wrote:
> >  -----Original Message-----
> > From: 	Steve King  
> > Sent:	12 December 2002 11:45
> > To:	pgsql-hackers@postgresql.org
> > Subject:	Duplicate oids!
> > 
> > Forgive me if this is a previous question but I cannot find any
> > information on it in any of the mailing lists.
> > 
> > I have a postgres database that contains a table with two identical
> > records including the oid.

What about ctid's, are they also the same ? 

Are the tuples on the same page ?

> > It seems as though one insert statement (intending one record to be
> > inserted) has caused two identical records to be inserted.
> > The insert statement was done via the c++ library.
> > 
> > Does anyone know anything about this?
> > 
> > My info can be supplied if this is not a known problem!
> > 
> > P.S. I am running Postgres 7.2
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
-- 
Hannu Krosing <hannu@tm.ee>

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Fri, 13 Dec 2002 11:56:51 -0000
Steve King <steve.king@ecmsys.co.uk>
Re: FW: Duplicate oids!
Steve King <steve.king@ecmsys.co.uk> writes:
> The ctids are different however vaccum is run on this table and the record
> is updated.

It would be useful to look at xmin,xmax,cmin,cmax of these tuples too.

Actually, if you don't mind grabbing a copy of pg_filedump --- see
http://sources.redhat.com/rhdb/tools.html --- then a dump of page 7
of that relation would be good to look at.  I am wondering about the
states of the infomask bits for these tuples...

			regards, tom lane

Fri, 13 Dec 2002 09:43:19 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: FW: Duplicate oids! 
On Fri, Dec 13, 2002 at 09:43:19AM -0500, Tom Lane wrote:

> Actually, if you don't mind grabbing a copy of pg_filedump --- see
> http://sources.redhat.com/rhdb/tools.html

Has this been updated for 7.3?  Last time I looked it only did 7.2, and
the site shows an old date.  If it hasn't, are there plans to update it
sometime soon?  It would be very useful to me right now...

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Para tener mas hay que desear menos"

Fri, 13 Dec 2002 12:33:27 -0300
Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: FW: Duplicate oids!
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> On Fri, Dec 13, 2002 at 09:43:19AM -0500, Tom Lane wrote:
>> Actually, if you don't mind grabbing a copy of pg_filedump --- see
>> http://sources.redhat.com/rhdb/tools.html

> Has this been updated for 7.3?  Last time I looked it only did 7.2, and
> the site shows an old date.  If it hasn't, are there plans to update it
> sometime soon?  It would be very useful to me right now...

AFAIK it has not been updated yet.  Patrick, do you have any near-term
plans to do so?  If not, perhaps Alvaro would like to do the legwork ;-)

I believe it should be possible to make a single version of pg_filedump
that understands both the 7.2 and 7.3 page layouts (the version field in
the page header would work for telling what you're looking at).

			regards, tom lane

Fri, 13 Dec 2002 10:40:48 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: FW: Duplicate oids! 
Tom Lane wrote:
> 
> Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> > On Fri, Dec 13, 2002 at 09:43:19AM -0500, Tom Lane wrote:
> >> Actually, if you don't mind grabbing a copy of pg_filedump --- see
> >> http://sources.redhat.com/rhdb/tools.html
> 
> > Has this been updated for 7.3?  Last time I looked it only did 7.2, and
> > the site shows an old date.  If it hasn't, are there plans to update it
> > sometime soon?  It would be very useful to me right now...
> 
> AFAIK it has not been updated yet.  Patrick, do you have any near-term
> plans to do so?  If not, perhaps Alvaro would like to do the legwork ;-)

Yes, it's on my list of things to do.   Look for an updated version
by middle of the week (once all the RHDB 2.1 work is finished).
 
> I believe it should be possible to make a single version of pg_filedump
> that understands both the 7.2 and 7.3 page layouts (the version field in
> the page header would work for telling what you're looking at)

Correct.  The tool will be updated to understand the different
page layouts/formats.  Two tools would be a pain...

Cheers,
Patrick
--
Patrick Macdonald
Red Hat Database Development

Mon, 16 Dec 2002 12:59:03 -0500
Patrick Macdonald <patrickm@redhat.com>
Re: FW: Duplicate oids!
Patrick Macdonald wrote:
> 
> Tom Lane wrote:
> >
> > Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> > > On Fri, Dec 13, 2002 at 09:43:19AM -0500, Tom Lane wrote:
> > >> Actually, if you don't mind grabbing a copy of pg_filedump --- see
> > >> http://sources.redhat.com/rhdb/tools.html
> >
> > > Has this been updated for 7.3?  Last time I looked it only did 7.2, and
> > > the site shows an old date.  If it hasn't, are there plans to update it
> > > sometime soon?  It would be very useful to me right now...
> >
> > AFAIK it has not been updated yet.  Patrick, do you have any near-term
> > plans to do so?  If not, perhaps Alvaro would like to do the legwork ;-)
> 
> Yes, it's on my list of things to do.   Look for an updated version
> by middle of the week (once all the RHDB 2.1 work is finished).

I've updated the pg_filedump utility for PostgreSQL 7.3.  The new 
version, 1.1, requires a PostgreSQL 7.3 source tree to build and 
can be used against RHDB 2.x/1.x and PostgreSQL 7.3/7.2/7.1
installations. 

All questions and comments about the tool should be directed to 
rhdb@sources.redhat.com, not this list.

The pg_filedump utility can be found at the Red Hat Database Project
site (http://sources.redhat.com/rhdb).

Cheers,
Patrick

Wed, 18 Dec 2002 15:24:46 -0500
Patrick Macdonald <patrickm@redhat.com>
Re: FW: Duplicate oids!