Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJO7b-0004EW-4e for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Dec 2016 17:22:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cJO7a-0007dA-MQ for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Dec 2016 17:22:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cJO7Z-0007cA-Cl for pgsql-hackers@postgresql.org; Tue, 20 Dec 2016 17:22:37 +0000 Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cJO7U-0007YH-QE for pgsql-hackers@postgresql.org; Tue, 20 Dec 2016 17:22:34 +0000 Received: by mail-qt0-x229.google.com with SMTP id w33so182904553qtc.3 for ; Tue, 20 Dec 2016 09:22:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=etXUrz41pv3hnocYkZdXMMt4WvEnMxDImuqCRw+WTtc=; b=CC+JuNP+tC0PCNEHW6irRa0A+HDM0BlMxYit1fzB4onBOO4kVa8Yi4DBpWYgeuCYo8 JWWzSOs0ZMecH9zUo/wHbsUcMixdfG8ahpDctFAGKYwq0y09KgHSUYRDfUkuuW0UOt9X e+cNpCTT/74bGdEP7OVJOaqegHYo44192TvI7sfJJczdLG4CaLrizK2zyRVIgyj2QWZN 1pYkddIAlekSUTKo/a0ZeqhF7ObIzV0WvYL9zCk3gXtRakA7z/TWN8S0aiZPxYd84XBR DvJRr6WOwQt/CIo7xFrqpLRuUi+ksaC5VbWz0W7I+6yO9MWlwrmH0yXb3o5iiVrtx8U0 JI/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=etXUrz41pv3hnocYkZdXMMt4WvEnMxDImuqCRw+WTtc=; b=hSijRWRRHVd0BzJ2fhVNS8hNpqBNVHfpBjlceZ7XVbG43tqUTZT/jw2HNaIJGxY9Zc 9T9gMl/ZoFIrPorXMPxO1EsmY27D5Otzc+AelryISmCSYDK5Yr+8rcvrL8xMSn1k65Kz bdBNNs5op6gdQ3nHwMqcjGCyNAJTC9YzYnjnqOkt3xAouNJO/xwivCD/9C7HgmIOD9j3 f3rWL46iDaPK9lBkSyPOd/3WC2Ca00rTk2ooOIEhgyDJYbNuP5QalalO/v63GbvlvgNg QdhOVoh8G9765kPyvERkswGSZMoL//4qdrj2YoqdMgCIwkvTPHZR18NI5MpTBxH6rS37 M24w== X-Gm-Message-State: AIkVDXLQsrPOAPmlyKtxTlG0y8IWanPDrHIipSwoqdaKSymjIoJnuSFsyr1Fm5xYIUTBDORD X-Received: by 10.200.1.19 with SMTP id e19mr433924qtg.147.1482254537163; Tue, 20 Dec 2016 09:22:17 -0800 (PST) Received: from alvin.alvh.no-ip.org ([179.56.97.120]) by smtp.gmail.com with ESMTPSA id z22sm13511672qkb.22.2016.12.20.09.22.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Dec 2016 09:22:16 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id B31219BB; Tue, 20 Dec 2016 14:22:14 -0300 (CLST) Date: Tue, 20 Dec 2016 14:22:14 -0300 From: Alvaro Herrera To: Robert Haas Cc: pgsql-hackers@postgresql.org, Amit Langote Subject: Re: [COMMITTERS] pgsql: Implement table partitioning. Message-ID: <20161220172214.xjgratgkhqhsp7gk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20161104 (1.7.1) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas wrote: > Implement table partitioning. I thought it was odd to use rd_rel->reloftype as a boolean in ATExecAttachPartition, but apparently we do it elsewhere too, so let's leave that complaint for another day. What I also found off in the same function is that we use SearchSysCacheCopyAttName() on each attribute and then don't free the result, and don't ever use the returned tuple either. A simple fix, I thought, just remove the "Copy" and add a ReleaseSysCache(). But then I noticed this whole thing is rather strange -- why not pass a boolean flag down to CreateInheritance() and from there to MergeAttributesIntoExisting() to implement the check? That seems less duplicative. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers