Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B0BC12E0EC0 for ; Tue, 13 Nov 2007 05:03:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 07608-08 for ; Tue, 13 Nov 2007 05:03:22 -0400 (AST) Received: from pat.uio.no (pat.uio.no [129.240.10.15]) by postgresql.org (Postfix) with ESMTP id A2BCB2E0CD9 for ; Tue, 13 Nov 2007 05:03:21 -0400 (AST) Received: from mail-mx3.uio.no ([129.240.10.44]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1Irrg0-0005Il-PW; Tue, 13 Nov 2007 10:03:20 +0100 Received: from smtp.uio.no ([129.240.10.9] helo=mail-mx3.uio.no) by mail-mx3.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1Irrg0-0003zn-9f; Tue, 13 Nov 2007 10:03:20 +0100 Received: from bbking.uio.no ([129.240.201.179]) by mail-mx3.uio.no with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1Irrg0-0003zc-2z; Tue, 13 Nov 2007 10:03:20 +0100 Message-ID: <47396857.1050801@usit.uio.no> Date: Tue, 13 Nov 2007 10:03:19 +0100 From: Rafael Martinez User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Heikki Linnakangas CC: pgsql-performance@postgresql.org Subject: Re: Need to run CLUSTER to keep performance References: <4732E6B4.1030907@usit.uio.no> <4732EF07.3060807@enterprisedb.com> <47332200.9050705@usit.uio.no> <24775.1194535980@sss.pgh.pa.us> <4738735B.6030408@usit.uio.no> <47387FED.8090408@enterprisedb.com> <47396527.5090801@usit.uio.no> In-Reply-To: <47396527.5090801@usit.uio.no> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-UiO-Resend: resent X-UiO-ClamAV-Virus: No X-UiO-Spam-info: not spam, SpamAssassin (score=-4.7, required=12.0, autolearn=disabled, AWL=0.326, UIO_MAIL_IS_INTERNAL=-5) X-UiO-Scanned: 3797A5D7E19BCD07184A34F5C0F737CB1832A13A X-UiO-SPAM-Test: remote_host: 129.240.10.9 spam_score: -46 maxlevel 200 minaction 2 bait 0 mail/h: 95 total 5089060 max/h 8345 blacklist 0 greylist 0 ratelimit 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/192 X-Sequence-Number: 27607 Rafael Martinez wrote: > Heikki Linnakangas wrote: > >> In 8.1, CLUSTER will remove those tuples anyway, but it's actually not >> correct. > > With other words, .... we have to be very carefull to not run CLUSTER on > a table been modified inside a transaction if we do not want to lose > data? ... > > Does this mean that if we run a transaction which update/delete many > rows, run cluster before the transaction is finnish, and then rollback > the transaction after cluster has been executed, all dead rows > updated/deleted by the transaction can not be rollbacked back because > they are not there anymore? > Stupid question, I could have checked this myself. CLUSTER will wait to be executed until the transaction is finish. I have just checked this. -- Rafael Martinez, Center for Information Technology Services University of Oslo, Norway PGP Public Key: http://folk.uio.no/rafael/