pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ravi Tammineni <rtammineni@partner.aligntech.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: What is the best way to create Primary Key on a large table in Postgresql 9.5?
Date: Thu, 18 Aug 2016 21:00:06 +0000
Message-ID: <BN1PR02MB23134DCFEF3087FA7DAF0EC80150@BN1PR02MB231.namprd02.prod.outlook.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

I have to create a primary key on a large table (~100Million records). What is the best and fastest way to create pkey? This column is a sequence column and i don't want to lock the table because this is highly transactional database.

Thanks
ravi

view thread (9+ messages)  latest in thread

Message-ID: <BN1PR02MB23134DCFEF3087FA7DAF0EC80150@BN1PR02MB231.namprd02.prod.outlook.com>
Permalink:  ../BN1PR02MB23134DCFEF3087FA7DAF0EC80150@BN1PR02MB231.namprd02.prod.outlook.com/
Also on:    postgresql.org/message-id/BN1PR02MB23134DCFEF3087FA7DAF0EC80150@BN1PR02MB231.namprd02.prod.outlook.com

 · 

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: rtammineni@partner.aligntech.com
  Subject: Re: What is the best way to create Primary Key on a large table in Postgresql 9.5?
  In-Reply-To: <BN1PR02MB23134DCFEF3087FA7DAF0EC80150@BN1PR02MB231.namprd02.prod.outlook.com>
  References: <BN1PR02MB23134DCFEF3087FA7DAF0EC80150@BN1PR02MB231.namprd02.prod.outlook.com>

* 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