Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YWkDQ-0003cV-0C for pgsql-admin@arkaria.postgresql.org; Sat, 14 Mar 2015 11:26:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YWkDP-000426-Ep for pgsql-admin@arkaria.postgresql.org; Sat, 14 Mar 2015 11:26:47 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YWkDO-00041w-GQ for pgsql-admin@postgresql.org; Sat, 14 Mar 2015 11:26:46 +0000 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YWkDE-0002mi-BD for pgsql-admin@postgresql.org; Sat, 14 Mar 2015 11:26:44 +0000 Received: by wggv3 with SMTP id v3so6379081wgg.1 for ; Sat, 14 Mar 2015 04:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=5KLrfNox2FIxiBPHTfWlZ/zZ1DBC+dJDH9GouSwZDh8=; b=EVCbRogwp4nN/wiTmqltvw1cLUvHt9BRrw0hLAJFBrvMTHyaGhkgHhlnzw6KIjN+nb 6Bg2aUFZ0UfEbmXLqfIresPOouVJE9anyvn3aPTx3wxYj/TugmaFqdL/WlZyHpJSLmSR MfVQMnfdESowDb2JK/ZfAD4JY0Uf1gp9W5sycYpeoXig+62guJtGAR/0QOW7R+7n4Fxk EOOtVQ/ykOkN5TKri+MAN9XBQA5/Ut2j8/BDPeCTXs2LnqJSJzPe9VqeF0apx6itRctW ad/sR9x19BugugDskVI0s9qVTXtpP2vqOdcVtRPCQ2hhEGsxfJdA1Xi5NF8SKT1VzEIp BW/w== X-Received: by 10.194.89.195 with SMTP id bq3mr81584388wjb.123.1426332394648; Sat, 14 Mar 2015 04:26:34 -0700 (PDT) Received: from enterprisedb01 (84.125.177.156.dyn.user.ono.com. [84.125.177.156]) by mx.google.com with ESMTPSA id ch6sm6660247wjc.3.2015.03.14.04.26.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Mar 2015 04:26:33 -0700 (PDT) Message-ID: <1426332393.3775.3.camel@gmail.com> Subject: Re: CLUSTERing a partition? From: jaime soler Reply-To: jaime.soler@gmail.com To: Dave Johansen Cc: pgsql-admin@postgresql.org Date: Sat, 14 Mar 2015 12:26:33 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org El vie, 13-03-2015 a las 16:33 -0700, Dave Johansen escribió: > I'm using Postgres 8.4 and I would like to cluster a partition but > keep running into issues with locks. CLUSTER requires an Exclusive > Lock and so it gets "stuck behind" running queries that have a Share > Lock on the partition even though they are not using the partition. I > would be fine if the cluster waited until after the existing queries > finished, but this then causes all new queries to back up behind it. I > tried doing "NO INHERIT" to remove the partition while the cluster is > happening, but that also requires an Exclusive Lock and runs into the > same problem. > uff postgresql 8.4, are you from the past? > > So is there some way that I can CLUSTER a partition? I would be fine > with removing the partition while the CLUSTER is happening, if that > makes it possible. There is a extension pg_repack http://pgxn.org/dist/pg_repack/1.3.1/ , that allows to retore order of a table without using a exclusive lock, but i don't know how it behavior with partitioned tables. good luck > > > Thanks, > > Dave -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin