Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hS4Zm-0000IU-6i for pgsql-hackers@arkaria.postgresql.org; Sat, 18 May 2019 19:00:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hS4Zk-0006lF-TP for pgsql-hackers@arkaria.postgresql.org; Sat, 18 May 2019 19:00:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hS4Zk-0006l8-D6 for pgsql-hackers@lists.postgresql.org; Sat, 18 May 2019 19:00:56 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hS4Zh-000289-4i for pgsql-hackers@postgresql.org; Sat, 18 May 2019 19:00:55 +0000 Received: by mail-wm1-x342.google.com with SMTP id j187so11453083wma.1 for ; Sat, 18 May 2019 12:00:52 -0700 (PDT) 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=F28UFKqMKoCh+8eTFRC4AMxeCr7IhdGGjq0RyQ45K8s=; b=SHT+HII3zjvm3rZNjkvUc3UTYjmOf69ohm5kLsn+ajkpXz062rKoLq5z41JTX8XnKh +OYZuWQw2HnMDnBQ4iSnlLbD552eFKGHSKaYVsT9pztgLMgiyVBxZ3vyIKvy2LpagijY /pd5Sa6zZZIUop2BWM9CWNP/wQ9twc18/MxsSMuuL4zLrjgg/v4YPAS6gMw8jjOjiB8D WskUphce59ZoCdfWCYcazSkYapMnG2UptwhuSFTCJPqQ86T8MUP3IemvKsnXInuI33Hm vuVx/oi3KADAhYPiWvi9gOsLwtOeEBDhbTJHxiIOFnVMc2DkgFgyrdrkI74xffH5MpyT JO7g== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=F28UFKqMKoCh+8eTFRC4AMxeCr7IhdGGjq0RyQ45K8s=; b=gndTvAho45xMWU5XCHwWiVih0dGbV08++SKa1i05rKnnWiJHTGurNjKQW6kHlMtmIP Ey+SqNefKmMSIyopm8YeNlGhJ2H72z6QB+OWMRyTPIq7ygIqoYBAFQy7SyfTOmvvJMgi zUYS0bvuxWQheZQEb6bBRf/TT2mz694euwVIBv7T9ve1FFWgkoIMVZwyr/Y7k1ybWBFF j0DwHW1JYYwqtjzFR08FT+PHrjNa4WdVSlHyUZor221BXicN31CScMbYtoX7ZIKJVBYF 4m1E0EywwjYZ2sUfSrsw+w7F2i6ldfw8SnchSW+ChDkGqGyuYZGMZgFdsbSSYWkuGPbf lIDQ== X-Gm-Message-State: APjAAAUur+vj2e/z2MkeTHFrGUJZ2eshRP+LM6ImB7jGSWpJpSXocaUM u7F2HWLY5JNUKkR5CPtk6kog+g== X-Google-Smtp-Source: APXvYqzeXn6Tq8fGG8byspRI+O78vkBtq+ol+nT/6raDi4hMsm4VZqCiFU22XIPCa4sMUCqHZaqvwQ== X-Received: by 2002:a1c:2dc2:: with SMTP id t185mr367379wmt.52.1558206051482; Sat, 18 May 2019 12:00:51 -0700 (PDT) Received: from localhost (ip-86-49-243-43.net.upcbroadband.cz. [86.49.243.43]) by smtp.gmail.com with ESMTPSA id v5sm23883581wra.83.2019.05.18.12.00.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 18 May 2019 12:00:48 -0700 (PDT) Date: Sat, 18 May 2019 21:00:42 +0200 From: Tomas Vondra To: Andres Freund Cc: Dean Rasheed , Tom Lane , PostgreSQL Hackers Subject: Re: Multivariate MCV stats can leak data to unprivileged users Message-ID: <20190518190042.2y33h4toxk4fxv5t@development> References: <20190513223605.lwj65akict3tpetv@development> <20190517202938.lkx6q2u6woiptrsa@alap3.anarazel.de> <21269.1558192388@sss.pgh.pa.us> <4E0E0C14-C476-446A-835F-CC3558709DA9@anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <4E0E0C14-C476-446A-835F-CC3558709DA9@anarazel.de> User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, May 18, 2019 at 11:49:06AM -0700, Andres Freund wrote: >Hi, > >On May 18, 2019 8:43:29 AM PDT, Dean Rasheed wrote: >>On Sat, 18 May 2019 at 16:13, Tom Lane wrote: >>> >>> Dean Rasheed writes: >>> > On the other hand, pg_dump relies on pg_statistic_ext to work out >>> > which extended statistics objects to dump. If we were to change >>that >>> > to use pg_stats_ext, then a user dumping a table with RLS using the >>> > --enable-row-security flag wouldn't get any extended statistics >>> > objects, which would be a somewhat surprising result. >>> >>> It seems like what we need here is to have a separation between the >>> *definition* of a stats object (which is what pg_dump needs access >>> to) and the current actual *data* in it. I'd have expected that >>> keeping those in separate catalogs would be the thing to do, though >>> perhaps it's too late for that. >>> >> >>Yeah, with the benefit of hindsight, that would have made sense, but >>that seems like a pretty big change to be attempting at this stage. > >Otoh, having a suboptimal catalog representation that we'll likely have >to change in one of the next releases also isn't great. Seems likely >that we'll need post beta1 catversion bumps anyway? > But that's not an issue intruduced by PG12, it works like that even for the extended statistics introduced in PG10. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services