pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Carmen Marincu <marincuc@eeng.dcu.ie>
To: pgsql-sql@postgresql.org
Subject: vacuum and serial primary keys
Date: Sat, 1 Feb 2003 12:45:24 +0000 (GMT)
Message-ID: <Pine.GSO.4.40.0302011244410.20287-100000@khumbu> (raw)
In-Reply-To: <3E3BB210.5C51478C@t1.unisoftbg.com>

Hello -

I am using Postgresql 7.1.3 and I have deleted 3000 rows from a table
(with DELETE).
Than I used vacuum <mytable> to actually delete the rows markes as deleted
by the DELETE command..
The trouble is that the "counter" for the serial primary key (ID field)
wasn't reset. So now althought I have only 2 rows in my table they have
the ID 3001 and 3002.

Is this normal ? If not could someone please explain me how could  I reset
the "counter" to ignore the deleted rows ?

Thank you very much
Carmen





view thread (2+ messages)  latest in thread

Message-ID: <Pine.GSO.4.40.0302011244410.20287-100000@khumbu>
Permalink:  ../Pine.GSO.4.40.0302011244410.20287-100000@khumbu/
Also on:    postgresql.org/message-id/Pine.GSO.4.40.0302011244410.20287-100000@khumbu

 · 

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-sql@postgresql.org
  Cc: marincuc@eeng.dcu.ie
  Subject: Re: vacuum and serial primary keys
  In-Reply-To: <Pine.GSO.4.40.0302011244410.20287-100000@khumbu>

* 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