pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Zhihong Zhang <zhihong@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: Indexing on JSONB field not working
Date: Thu, 26 Dec 2019 18:51:34 -0500
Message-ID: <9485.1577404294@sss.pgh.pa.us> (raw)
In-Reply-To: <20191226234124.wuarzcbdq5z5msiy@development>
References: <20191220223005.f6w4ff4kdbgtanpz@development>
	<E3D6070E-72E0-4FE5-9E30-D114530F383F@gmail.com>
	<CAMkU=1z8X1s0WChsgKU7SN8ngrLKHt38UhAqKn-nGTf+xbQ9zg@mail.gmail.com>
	<E0F0CF2B-46DB-425C-9338-0FA59561B6B6@gmail.com>
	<CAMkU=1w8UyLY1e4N6m5nB9CmG1wjizqFS--Lmi3GZ4j1+JUP3Q@mail.gmail.com>
	<83E6A3F7-B1B4-4AD6-905A-BE11D244D35A@gmail.com>
	<4910.1577386715@sss.pgh.pa.us>
	<0A83C661-EDBB-43C8-9CBB-FB1E321A15CB@gmail.com>
	<12042.1577393358@sss.pgh.pa.us>
	<F075C03D-B73B-4A59-B080-101331F8814C@gmail.com>
	<20191226234124.wuarzcbdq5z5msiy@development>

Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> On Thu, Dec 26, 2019 at 05:25:22PM -0500, Zhihong Zhang wrote:
>> I am not superuser. Let me see how I can get access to the superuser on RDS.

> You can't - that's the point of am environment managed by someone else.
> Perhaps you could inspect the data directly in pg_statistic, not through
> the pg_stats view. But I haven't tried if that works on RDS.

He definitely shouldn't be able to do that, if not superuser.

However, after experimenting a bit it seems like pg_stats does work for
indexes as long as you are the owner of the index's table, which probably
explains why it took so long for anybody to notice the problem.  Maybe the
OP is trying to look at the stats as a non-owner that's just been GRANT'ed
table access?

			regards, tom lane





view thread (43+ messages)  latest in thread

Message-ID: <9485.1577404294@sss.pgh.pa.us>
Permalink:  ../9485.1577404294@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9485.1577404294@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tomas.vondra@2ndquadrant.com, zhihong@gmail.com, jeff.janes@gmail.com
  Subject: Re: Indexing on JSONB field not working
  In-Reply-To: <9485.1577404294@sss.pgh.pa.us>
  References: <20191220223005.f6w4ff4kdbgtanpz@development> <E3D6070E-72E0-4FE5-9E30-D114530F383F@gmail.com> <CAMkU=1z8X1s0WChsgKU7SN8ngrLKHt38UhAqKn-nGTf+xbQ9zg@mail.gmail.com> <E0F0CF2B-46DB-425C-9338-0FA59561B6B6@gmail.com> <CAMkU=1w8UyLY1e4N6m5nB9CmG1wjizqFS--Lmi3GZ4j1+JUP3Q@mail.gmail.com> <83E6A3F7-B1B4-4AD6-905A-BE11D244D35A@gmail.com> <4910.1577386715@sss.pgh.pa.us> <0A83C661-EDBB-43C8-9CBB-FB1E321A15CB@gmail.com> <12042.1577393358@sss.pgh.pa.us> <F075C03D-B73B-4A59-B080-101331F8814C@gmail.com> <20191226234124.wuarzcbdq5z5msiy@development> <9485.1577404294@sss.pgh.pa.us>

* 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