Primary Key - Mailing list pgsql-general

From Joey Quinn
Subject Primary Key
Date
Msg-id CAG5XHY=H4jiPD0+3QwQKgiHqke3srK=uj7EEAymD+QdXC7xu0w@mail.gmail.com
Whole thread Raw
Responses Re: Primary Key
Re: Primary Key
List pgsql-general
I have a table (5 columns) with approximately 670 million rows. It has had an index (unique) on an inet column from the beginning. Today I added a primary key constraint based on the same column thinking that since it already had an index, this would be a relatively quick operation. That does not appear to be case. It has gone into a "not responding" status for an hour or so now. As a point of reference, I'm using 9.3 on a 64 bit Windows Server 2008 (32 GB ram) and inserts so far have taken 6 1/2 - 7 minutes for each batch of 16.7 million rows.

Other than not creating the primary key at the beginning, did I do anything wrong? and can I reasonably expect the current operation to finish?

Joey

pgsql-general by date:

Previous
From: Mike Broers
Date:
Subject: corruption issue after server crash - ERROR: unexpected chunk number 0
Next
From: Elliot
Date:
Subject: Re: Primary Key