X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AECEA56881 for ; Sun, 20 Mar 2005 00:16:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00437-09 for ; Sun, 20 Mar 2005 00:16:24 +0000 (GMT) Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by svr1.postgresql.org (Postfix) with ESMTP id 545BB568A7 for ; Sun, 20 Mar 2005 00:16:23 +0000 (GMT) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.34) id 1DCo7E-0007kt-Am for pgsql-performance@postgresql.org; Sun, 20 Mar 2005 01:16:25 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1DCo7D-0004iX-00 for ; Sun, 20 Mar 2005 01:16:23 +0100 Date: Sun, 20 Mar 2005 01:16:23 +0100 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: What needs to be done for real Partitioning? Message-ID: <20050320001623.GA16805@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org References: <200503191202.38089.josh@agliodbs.com> <18168.1111265368@sss.pgh.pa.us> <200503191529.51794.josh@agliodbs.com> <3375.1111276999@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3375.1111276999@sss.pgh.pa.us> X-Operating-System: Linux 2.6.11-rc3 on a i686 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.6+20040907i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.021 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/382 X-Sequence-Number: 11087 On Sat, Mar 19, 2005 at 07:03:19PM -0500, Tom Lane wrote: > Possibly, but I'm concerned about locking and deadlock issues. The > reason that this is iffy is you would start the operation with only > an INSERT-grade lock, and then discover that you needed to add a > partition, which is surely something that needs an exclusive-grade > lock (consider two sessions trying to add the same partition at the > same time). So I don't see how to do it without lock upgrading, > and lock upgrading is always a recipe for deadlocks. What about letting something periodical (say, vacuum) do this? /* Steinar */ -- Homepage: http://www.sesse.net/