Re: alter table without an ACCESS EXCLUSIVE lock

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Berger <4postgres(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: alter table without an ACCESS EXCLUSIVE lock
Date: 2011-06-16 18:21:40
Message-ID: 6559.1308248500@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Andreas Berger <4postgres(at)gmail(dot)com> writes:
> i'm searching for a solution for changing the type of a column, e.g. from
> varchar(128) to varchar(512), without an ACCESS EXCLUSIVE lock.

That specific case (increasing the max length of a varchar column) could
be handled by hacking the pg_attribute.atttypmod entry for the column,
since no change in the actual data is required.

However, I have no idea whether your replication environment would cope
with such a change --- experimenting on a non-production setup would be
highly recommendable.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alban Hertroys 2011-06-16 18:30:07 Re: [GENERAL] Postgres 8.3.10 Alter Table Waiting issue
Previous Message Pratheeban Jebasingh Tharmaraj 2011-06-16 16:30:51 Postgres 8.3.10 Alter Table Waiting issue