Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJisw-00071s-2v for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Dec 2016 15:32:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cJisv-0008OF-Hf for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Dec 2016 15:32:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cJirV-0006jI-Ke for pgsql-hackers@postgresql.org; Wed, 21 Dec 2016 15:31:25 +0000 Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cJirR-00011r-SY for pgsql-hackers@postgresql.org; Wed, 21 Dec 2016 15:31:25 +0000 Received: by mail-qk0-x236.google.com with SMTP id q68so85183894qki.1 for ; Wed, 21 Dec 2016 07:31:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=c/XRReDut7La2K8ZHu/d7KHWNb/HfFaFc3p/+70Ctq4=; b=sx7SasGmY5UqLe/wzbCpcNe3vVWkZMB/bevShwNiPfyYESdthbNdmhdmooQunhXkZP mZF+jXUDK1x0SiGMlnDAHcQH5rcnr5u+0VoP2jILkv+U7igjMcWhHt0XptocPPbLaXJ6 /ot08gL56WePRZ/v5lAKK7h59cn3bjXal23JmonUrhSr7yCXrNYfqx1zwHy8udIvqJcz RIQbLWKxXckDJFIf+2n6Pqj9kQdPPJt6k3qsGx50PO9DIC7QSIxR9JprHneCbPHkCE0J opo8NvFuZpMdH8OCFLDGXcCqxGkj0IZLcVz+V2r3uYHH4k8PC3wruZoZtkFG4sDG+ZcL CbcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=c/XRReDut7La2K8ZHu/d7KHWNb/HfFaFc3p/+70Ctq4=; b=SOaHuLfC1YiEdHJOmIblYVr8N0lkNhicy//wM8e2faU3nWQ0aKbK0cwdvhEMlPdhE7 dWNMoVbqE4heYLxKG3FC7tga86kWDtpgKW5z9R+IXgm9GAuHLTSFZfed2Yi3KZdZ7UkE lmT7eQvUcW1pzrSXkqp9oPyszzjsYuwmowktLBOkEsdBf3wRT6uzYzDJXtywGJs4E5hB m4UWeoiDWoWqIO9DWDcySr1JD9XPfFifOLILHRWQI9yAgdyPxIof462gNs7T0asZeWDV Z1KvXq7NC5CZ4wUZ3j0fHfvqfj3atB6zKxnWB3GI1kdj0Dxt8GCNyIUaYHKCSN7P1Fpa EihQ== X-Gm-Message-State: AIkVDXJ0N/HU8Ii+eulMxCBuib+Do0L4dB9m+BVWcAjxMyagwvotrnHIEuTMHSFXoS29FqvaU2b1kxratpZB9A== X-Received: by 10.55.169.21 with SMTP id s21mr457138qke.246.1482334279569; Wed, 21 Dec 2016 07:31:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.61.72 with HTTP; Wed, 21 Dec 2016 07:31:18 -0800 (PST) In-Reply-To: <20161220172214.xjgratgkhqhsp7gk@alvherre.pgsql> References: <20161220172214.xjgratgkhqhsp7gk@alvherre.pgsql> From: Robert Haas Date: Wed, 21 Dec 2016 10:31:18 -0500 Message-ID: Subject: Re: [COMMITTERS] pgsql: Implement table partitioning. To: Alvaro Herrera Cc: "pgsql-hackers@postgresql.org" , Amit Langote Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.7 (--) 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 On Tue, Dec 20, 2016 at 12:22 PM, Alvaro Herrera wrote: > 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. Ugh. I agree - that's bad style. > 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(). Or use SearchSysCachExists. > 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. Hmm, that would be another way to do it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers