pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: qiumingcheng <qiumingcheng@aliyun.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Cc: yuexingzhi <yuexingzhi@hotmail.com>
Subject: Re: 回复:回复:回复:A question about leakproof
Date: Mon, 17 Oct 2022 16:07:33 +0200
Message-ID: <7ea51194f227584cc85a428bc4ef5d39ed36f5b8.camel@cybertec.at> (raw)
In-Reply-To: <195c5d95-8749-4419-a4f4-604cc8c937ec.qiumingcheng@aliyun.com>
References: <9cc93fdc-2f99-4963-b895-169135b742a8.qiumingcheng@aliyun.com>
	<20221017014020.qpu2f5yy4lridhic@jrouhaud>
	<2067840.1665971686@sss.pgh.pa.us>
	<9b7029cb-cd0d-494d-8628-93c7f8948117.qiumingcheng@aliyun.com>
	<2077794.1665977617@sss.pgh.pa.us>
	<e2ca8df9-0ce2-4a69-bbe3-7c3bc81f9234.qiumingcheng@aliyun.com>
	<9e253a3226436819f0aaf59fb82137477d9f5a78.camel@cybertec.at>
	<195c5d95-8749-4419-a4f4-604cc8c937ec.qiumingcheng@aliyun.com>

On Mon, 2022-10-17 at 16:24 +0800, qiumingcheng wrote:
> > "you seem to be imagining that changes in a query's plan on the basis of changes
> > in collected statistics have something to do with this.  They do not."
>
> 1. My understanding of the above paragraph is that for the same view and different users,
>    the proleakproof=false attribute of the function will not lead to inconsistent plans,
>    but my actual test result is that proleakproof=false will lead to inconsistent plans.

The above says "on the basis of changes in collected statistics".  The different execution
you see is not because the statistics are different, but because the permissions of the
users are different.

> 2. What's the reason about the function timestamp_gt_timestampz  may  cause data leakage?
>    Can you explain how it causes data leakage?

I don't know the reason in this case.  You could look at the source code, perhaps it is
possible to cause error messages that can give you some clue as to the value that you
compare with.  But perhaps, as Tome said, it is just that nobody scrutinized the function
hard enough to exclude that something like that can happen.

Yours,
Laurenz Albe






view thread (14+ messages)  latest in thread

Message-ID: <7ea51194f227584cc85a428bc4ef5d39ed36f5b8.camel@cybertec.at>
Permalink:  ../7ea51194f227584cc85a428bc4ef5d39ed36f5b8.camel@cybertec.at/
Also on:    postgresql.org/message-id/7ea51194f227584cc85a428bc4ef5d39ed36f5b8.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, qiumingcheng@aliyun.com, tgl@sss.pgh.pa.us, rjuju123@gmail.com, yuexingzhi@hotmail.com
  Subject: Re: 回复:回复:回复:A question about leakproof
  In-Reply-To: <7ea51194f227584cc85a428bc4ef5d39ed36f5b8.camel@cybertec.at>
  References: <9cc93fdc-2f99-4963-b895-169135b742a8.qiumingcheng@aliyun.com> <20221017014020.qpu2f5yy4lridhic@jrouhaud> <2067840.1665971686@sss.pgh.pa.us> <9b7029cb-cd0d-494d-8628-93c7f8948117.qiumingcheng@aliyun.com> <2077794.1665977617@sss.pgh.pa.us> <e2ca8df9-0ce2-4a69-bbe3-7c3bc81f9234.qiumingcheng@aliyun.com> <9e253a3226436819f0aaf59fb82137477d9f5a78.camel@cybertec.at> <195c5d95-8749-4419-a4f4-604cc8c937ec.qiumingcheng@aliyun.com> <7ea51194f227584cc85a428bc4ef5d39ed36f5b8.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox