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 1hS11S-0008BZ-W8 for pgsql-hackers@arkaria.postgresql.org; Sat, 18 May 2019 15:13:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hS11R-000140-La for pgsql-hackers@arkaria.postgresql.org; Sat, 18 May 2019 15:13:17 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hS11R-00013t-D9 for pgsql-hackers@lists.postgresql.org; Sat, 18 May 2019 15:13:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hS11P-0003GO-Ce for pgsql-hackers@postgresql.org; Sat, 18 May 2019 15:13:17 +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 x4IFD8sW021270; Sat, 18 May 2019 11:13:08 -0400 From: Tom Lane To: Dean Rasheed cc: Andres Freund , Tomas Vondra , PostgreSQL Hackers Subject: Re: Multivariate MCV stats can leak data to unprivileged users In-reply-to: References: <20190513223605.lwj65akict3tpetv@development> <20190517202938.lkx6q2u6woiptrsa@alap3.anarazel.de> Comments: In-reply-to Dean Rasheed message dated "Sat, 18 May 2019 11:48:35 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21268.1558192388.1@sss.pgh.pa.us> Date: Sat, 18 May 2019 11:13:08 -0400 Message-ID: <21269.1558192388@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. regards, tom lane