pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ow Mun Heng <Ow.Mun.Heng@wdc.com>
To: Pgsql performance <pgsql-performance@postgresql.org>
Subject: Altering a column type - Most efficient way
Date: Thu, 10 Jul 2008 15:53:00 +0800
Message-ID: <1215676380.15319.2.camel@neuromancer.home.net> (raw)

Is there any quick hacks to do this quickly? There's around
20-30million
rows of data. 

I want to change a column type from varchar(4) to varchar()

table size is ~10-15GB (and another 10-15G for indexes)

What would be the preferrred way of doing it? SHould I be dropping the
indexes 1st to make things faster? Would it matter?

The punch line is that since the databases are connected via slony, this
makes it even harder to pull it off. My last try got the DDL change
completed in like 3 hours (smallest table of the bunch) and it hung
everything.








view thread (10+ messages)  latest in thread

Message-ID: <1215676380.15319.2.camel@neuromancer.home.net>
Permalink:  ../1215676380.15319.2.camel@neuromancer.home.net/
Also on:    postgresql.org/message-id/1215676380.15319.2.camel@neuromancer.home.net

 · 

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-performance@postgresql.org
  Cc: Ow.Mun.Heng@wdc.com
  Subject: Re: Altering a column type - Most efficient way
  In-Reply-To: <1215676380.15319.2.camel@neuromancer.home.net>

* 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