pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Berger <4postgres@gmail.com>
To: tgl@sss.pgh.pa.us
To: pgsql-admin@postgresql.org
Subject: Re: alter table without an ACCESS EXCLUSIVE lock
Date: Fri, 17 Jun 2011 11:59:44 +0200
Message-ID: <BANLkTikh0czdScJ2mKR7XPYZkregdinfOA@mail.gmail.com> (raw)

Thanks for your answer!
In this spacial case your suggestion is a solution, but I am searching
for an opportunity to make every change (e.g. alter table) without
effecting availability of the database and the modified table when using
wal shipping (maybe something like concurrently when creating an index).
When using skytools I can keep the downtime minimal by doing a master
slave change after modifying the slave db. But the question now is, is
it possible to use wal shipping without having downtimes when modifying
tables?

regards,
Andi


On 2011-06-16 20:21, Tom Lane wrote:

> Andreas Berger <4postgres@gmail.com> <4postgres@gmail.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

view thread (4+ messages)

Message-ID: <BANLkTikh0czdScJ2mKR7XPYZkregdinfOA@mail.gmail.com>
Permalink:  ../BANLkTikh0czdScJ2mKR7XPYZkregdinfOA@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTikh0czdScJ2mKR7XPYZkregdinfOA@mail.gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: 4postgres@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: alter table without an ACCESS EXCLUSIVE lock
  In-Reply-To: <BANLkTikh0czdScJ2mKR7XPYZkregdinfOA@mail.gmail.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