Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9wxR-00013v-O9 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jun 2016 16:00:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b9wxR-00040t-7x for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jun 2016 16:00: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 1b9ww6-0002SZ-1C for pgsql-hackers@postgresql.org; Mon, 06 Jun 2016 15:59:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b9ww2-0004kQ-LG for pgsql-hackers@postgresql.org; Mon, 06 Jun 2016 15:59:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u56FxORw022809; Mon, 6 Jun 2016 11:59:24 -0400 From: Tom Lane To: Tomas Vondra cc: pgsql-hackers@postgresql.org Subject: Re: New design for FK-based join selectivity estimation In-reply-to: References: <31041.1465069446@sss.pgh.pa.us> Comments: In-reply-to Tomas Vondra message dated "Mon, 06 Jun 2016 03:23:27 +0200" Date: Mon, 06 Jun 2016 11:59:24 -0400 Message-ID: <22808.1465228764@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) 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 Tomas Vondra writes: > One of the recent issues with the current design was handling of > inheritance / appendrels. ISTM the proposed design has the same issue, > no? What happens if the relations are partitioned? I haven't thought about inheritance in this proposal. My initial feeling is that considering the parent table's outgoing FKs (if any) as valid is not unreasonable. If it has any, probably all the children do too. Not sure about incoming FKs, but there probably are none anyhow, since our implementation doesn't really permit reasonable FK definitions that reference a partitioned table. In any case, whatever we might choose to do differently for inheritance would be no harder in this scheme than what's there now; plus, whatever it is, we'd do it once not once per join relation. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers