X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5E06C9FA5F0 for ; Wed, 7 Jun 2006 11:50:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 20784-09 for ; Wed, 7 Jun 2006 11:50:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 30C839FA5D3 for ; Wed, 7 Jun 2006 11:50:22 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 48A0556453; Wed, 7 Jun 2006 09:50:21 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 7 Jun 2006 09:50:20 -0500 Date: Wed, 7 Jun 2006 09:50:20 -0500 From: "Jim C. Nasby" To: soni de Cc: pgsql-performance@postgresql.org Subject: Re: Regarding ALTER Command Message-ID: <20060607145020.GT45331@pervasive.com> References: <9f2e40a90606070543l1066f162v19fc0887d916e2bb@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f2e40a90606070543l1066f162v19fc0887d916e2bb@mail.gmail.com> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060607:soni.de@gmail.com::6r0Nl6lL6Pl/2ime:00000000000000000000 0000000000000000000000004yIH X-Hashcash: 1:20:060607:pgsql-performance@postgresql.org::UAzeuVqJNJTRzbqx:00000 0000000000000000000000000cYF X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/77 X-Sequence-Number: 19434 On Wed, Jun 07, 2006 at 06:13:11PM +0530, soni de wrote: > Hello, > > > > We have database on which continueous operations of INSERT, DELETE, UPDATE > are going on, In the mean time irrespective of INSERT and UPDATE we want to > ALTER some filelds from the table can we do that? > > Would the ALTER command on heavily loaded database create any perfomance > problem? > > Is it feasible to do ALTER when lots of INSERT operations are going on? The problem you'll run into is that ALTER will grab an exclusive table lock. If *all* the transactions hitting the table are very short, this shouldn't be too big of an issue; the ALTER will block all new accesses to the table while it waits for all the pending ones to complete, but if all the pending ones complete quickly it shouldn't be a big issue. If one of the pending statements takes a long time though... > Postgresql version we are using is -- PostgreSQL 7.2.4 You very badly need to upgrade. 7.2 is no longer supported, and there have been over a half-dozen data loss bugs fixed since then. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461