Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 825589F9DB2 for ; Mon, 3 Sep 2007 08:22:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 16659-08 for ; Mon, 3 Sep 2007 08:22:11 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by postgresql.org (Postfix) with ESMTP id 261319F9DA8 for ; Mon, 3 Sep 2007 08:22:16 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id r21so1361279wxc for ; Mon, 03 Sep 2007 04:22:15 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=k7acUwxhAnP7wniQEILrzrRXeYrgv3+XL56n4f7zll2FRayz4G8Jc6AkR7vF7KjBcDVu9YQP8K2pzjzggC/YVmy41nGwvMjgarMsmVOlSx4lmvT3FRWipYarLgXCH8t2vy6a9Qc6/GG7iFtmU6XMVRJTw6wKqY2/M3K9Tn0JkFs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=afc1L1um555EwzoUZWpdXohm+r4EAQajujG3rQQmvu0TZCoV7Bir4IHqDY9mLY4CCfzQUfIYxXVh3qPz4XRREakNRUuBvvXa89MduudayEyLzJkKRARHS89W2/9TdMopteGRw6IPXOemipBoBGeRqNervoZ574pQNgUyvrBon28= Received: by 10.90.115.9 with SMTP id n9mr3756896agc.1188818535138; Mon, 03 Sep 2007 04:22:15 -0700 (PDT) Received: by 10.90.87.17 with HTTP; Mon, 3 Sep 2007 04:22:15 -0700 (PDT) Message-ID: Date: Mon, 3 Sep 2007 13:22:15 +0200 From: "Stefan Arentz" To: pgsql-sql@postgresql.org Subject: Speeding up schema changes MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/7 X-Sequence-Number: 29220 Is there a way to speed up simple schema changes like ... ALTER TABLE foo ADD COLUMN bar CHAR(64); ... where foo already contains millions of records? On a live database changes like this can take hours. Even when the database is idle. Is there a better way to do this? S.