Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ainRf-0008F6-1F for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Mar 2016 18:23:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ainRe-0002Cz-Ba for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Mar 2016 18:23:50 +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 1ainRc-0002CP-R0 for pgsql-hackers@postgresql.org; Wed, 23 Mar 2016 18:23:48 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ainRZ-0007A7-I0 for pgsql-hackers@postgresql.org; Wed, 23 Mar 2016 18:23:47 +0000 Received: by mail-wm0-x22a.google.com with SMTP id l68so244997149wml.0 for ; Wed, 23 Mar 2016 11:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=uoFuTJ2ilbtzD/FY9ui9+QS3oAT3rLNaJAV6lTNEYbI=; b=j5cS9H+ABknu6ge4L9TsvKVWpplHQQ9g7nh+cWsP9etBj2EJwnEgBbh76/18OREkVI SiiJNunH//gClhBFoz/7V86XnIK7A3gNqFuI5RVBE9fxCQq3aFH+ZWZPPfk40d2cHljp LsCIuKA5peVmfh3B/J6TQA/cdaHR+JqqKMbWo3gFalDMIDKw+njFSDPIap2ZYrGukQ+8 MZ8ua0zInnWIMRd33OZ04X/eFDRgdVjRN19KM+DfJAdFy0UmIfbcKAZ5EIy0CY5Ebhlk acoiUKmRvmPf3Iy1rgCJeXfGsnoq0/4W/QzdDZxyDMOFHWcFWE/vw3l6MGoGxVLBzD0Q 2/BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=uoFuTJ2ilbtzD/FY9ui9+QS3oAT3rLNaJAV6lTNEYbI=; b=BShehmRJq46s633W9FmLcYhngIYnfubnti1AB5Sw1zrGo02pRx5zG3ZW7QMKspC1Fg El0wIks44cvuYfV2An+VclFDR4rOnhuBgLswN6S5QbTkIMtMIaL+PXmp23AzUBO4mSNj 3ts0JGP3NfuTqzI0ox39aeO5Mak5zCZ9eQ7O4xkq5ELiAJ9oA6wQJTVSwRtDYtZkz99F HueoDyIXAIQgX+uCQVsCGo/SkIeqSqAbKUo3rgI6xOmcouBfRc8t1IRNWoOdpyu+0m+5 z5+DHHZf/WvGMOuiQp6+cPPHBtTzjkzboYQ/q/brHz82y1nM/i4UAP2RaJfFF0w2GaPG g/Mw== X-Gm-Message-State: AD7BkJLAhHUMdOUjUXob7/Ot2TZ30CpeQv/4Ee9ALgxnAyEg769iZyrPCZK0f4CWymFTe6Fy3ha89e2zyK5J4b+5Z1M59qJ0rkW5OCwRKiUDW5n0tPn9pYGuOL59I1TEiayG/lDBNd9sjw1KUNfnd6e9RmSCglNq0Ph9SaGKuxkAz8CyLtHN1fzik08GGxibew== X-Received: by 10.28.214.11 with SMTP id n11mr5179137wmg.31.1458757423522; Wed, 23 Mar 2016 11:23:43 -0700 (PDT) Received: from [192.168.0.103] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id a1sm3745605wje.43.2016.03.23.11.23.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2016 11:23:42 -0700 (PDT) Subject: Re: multivariate statistics v14 To: Tomas Vondra , Tatsuo Ishii References: <20160323.110125.1808526964660429411.t-ishii@sraoss.co.jp> <20160323.115758.938003466026607400.t-ishii@sraoss.co.jp> <20160323.120101.207302357952079425.t-ishii@sraoss.co.jp> <20160323.142004.624106180171245380.t-ishii@sraoss.co.jp> Cc: jeff.janes@gmail.com, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org From: Petr Jelinek Message-ID: <56F2DF2C.6070202@2ndquadrant.com> Date: Wed, 23 Mar 2016 19:23:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 Hi, I'll add couple of code comments from my first cursory read through (this is huge): 0002: there is some whitespace noise between the varlistentries in alter_statistics.sgml + parentobject.classId = RelationRelationId; + parentobject.objectId = ObjectIdGetDatum(RelationGetRelid(rel)); + parentobject.objectSubId = 0; + childobject.classId = MvStatisticRelationId; + childobject.objectId = statoid; + childobject.objectSubId = 0; I wonder if this (several places similar code) would be simpler done using ObjectAddressSet() The common.h in backend/utils/mvstat is slightly weird header file placement and naming. 0004: +/* used for merging bitmaps - AND (min), OR (max) */ +#define MAX(x, y) (((x) > (y)) ? (x) : (y)) +#define MIN(x, y) (((x) < (y)) ? (x) : (y)) Huh? We have Max and Min macros defined in c.h + values[Anum_pg_mv_statistic_stamcv - 1] = PointerGetDatum(data); Why the double space (that's actually in several places in several of the patches). I don't really understand why 0008 and 0009 are separate patches and aren't part of one of the other patches. But otherwise good job on splitting the functionality into patchset. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, 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