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 1ikvew-0006XC-Es for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Dec 2019 19:52:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ikvev-0004jQ-AM for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Dec 2019 19:52:29 +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 1ikveu-0004iY-Sb for pgsql-bugs@lists.postgresql.org; Fri, 27 Dec 2019 19:52:29 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ikver-0005a8-UG for pgsql-bugs@lists.postgresql.org; Fri, 27 Dec 2019 19:52:27 +0000 Received: by mail-qt1-x842.google.com with SMTP id q20so25254532qtp.3 for ; Fri, 27 Dec 2019 11:52:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=H4A/xEEr5j6Pup4PTKfmBJGaUnSbssBhTI6E/BRxnVI=; b=Bw3iPULuicYDJIu2TfBMf8WCCG+59PgXisPLLEu44e9K2ivKwjbO4hEu4mgkLtRx6j ViggC5kup5calMZmpwuVwt86j3+9kaMGaDbJOFZGTGxQXqk0J8aevkzQR3YaR/8iv+y7 LmHIUgkAuUVMtf7ALpcr2o6KVBvQMqX5m1s4N6E02Ti4cMPrZsQsKhp/uCaqGUYHIZpk BLztA+Prt7el1LcNNHu4TJ2BjZW5goRv5WVt0wsOlO6T4TM1EScRTCIeMKHtSPesKhWu suA9fk97zzFrCovVFXNoY/gfh4/1cocOoM2MD9JoY15ltLtR31oyQ4/rxUiWwosHVk2X tZow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=H4A/xEEr5j6Pup4PTKfmBJGaUnSbssBhTI6E/BRxnVI=; b=kJ1ZgALzwh6MBRRNKjKAD/3FJqQYXh4hrhsv30AGrP6OrklRoSlqvSj1FOm6BE5riw JtUJtg1mNP1soRFyd6/QVb0xTSarUtnTQ4JU0OxFrK9WlsRkNNM5nVtRzp0KdKOEFy/a 7JHJ2XjIu3JPtp2ckrkVTZMf6W32O9i4Km3plR3XwPvcDwL/LHy4Cvpp2JN87esG2YCP 8aC+Gg4tRpuiXIS4TMlxYZFa1rrF9fdeOMxrGYGCX2EvsNQUk8u3aeshHsdRdg+A9Ovb GdO3QMP/QGC8pmHZxJ9tABBkACx0NPCu3F3TuDpwSjTQIFfUqcGhhnTV5wMosYEI/7Lv WjIQ== X-Gm-Message-State: APjAAAU+dRQJYf1OSGQ8PAZprAARe1Ak6xbpHCeYLaw118F1xQ7h928Y rruIZzVdUG9N5TdmaQO+vBo= X-Google-Smtp-Source: APXvYqw+iL7Z2Utg7xIQBVYkPwRXOtiN5+x/avimolRtezbLuHufxOtYRSNiX2odGYoqMhO3+56bWg== X-Received: by 2002:ac8:440b:: with SMTP id j11mr39984961qtn.283.1577476344817; Fri, 27 Dec 2019 11:52:24 -0800 (PST) Received: from [10.8.0.6] (pool-173-79-120-3.washdc.fios.verizon.net. [173.79.120.3]) by smtp.gmail.com with ESMTPSA id s11sm10007483qkg.99.2019.12.27.11.52.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Dec 2019 11:52:24 -0800 (PST) From: Zhihong Zhang Message-Id: <8A8F3B89-D73E-4247-B4B5-4AAD08DD9FBB@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_92FE80EB-7289-4804-A3A6-ADCC17FADBE4" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: Indexing on JSONB field not working Date: Fri, 27 Dec 2019 14:52:23 -0500 In-Reply-To: <11610.1577468732@sss.pgh.pa.us> Cc: Tomas Vondra , pgsql-bugs@lists.postgresql.org To: Tom Lane References: <0cf001d5b77f$bfe47e10$3fad7a30$@gmail.com> <20191220223005.f6w4ff4kdbgtanpz@development> <20191221114003.yo56lv3o6thdvxtn@development> <21855.1576943356@sss.pgh.pa.us> <0AA828F3-5BA5-48CD-B229-8351ACB308D3@gmail.com> <167501d5bcdb$13854b20$3a8fe160$@gmail.com> <11610.1577468732@sss.pgh.pa.us> X-Mailer: Apple Mail (2.3608.40.2.2.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_92FE80EB-7289-4804-A3A6-ADCC17FADBE4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 27, 2019, at 12:45 PM, Tom Lane wrote: >=20 > I think we can eliminate the RLS-is-blocking-it idea, because that > would also apply to stats on simple columns. But maybe your user only > has select privilege on some columns of the table in question? >=20 The user is the default/vanilla RDS account. We didn=E2=80=99t set any = special permissions.=20 Let me know if you want check any specific permissions. Here are all the = permissions I know of, SELECT grantee, privilege_type FROM information_schema.role_table_grants = WHERE table_name=3D'assets_copy'; grantee | privilege_type ----------+---------------- postgres | INSERT postgres | SELECT postgres | UPDATE postgres | DELETE postgres | TRUNCATE postgres | REFERENCES postgres | TRIGGER (7 rows) Thanks! Zhihong --Apple-Mail=_92FE80EB-7289-4804-A3A6-ADCC17FADBE4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Dec 27, 2019, at 12:45 PM, Tom Lane <tgl@sss.pgh.pa.us> = wrote:

I think we can eliminate the = RLS-is-blocking-it idea, because that
would also apply to stats on simple columns.  But maybe = your user only
has select privilege on some columns of the table in = question?


The user is the default/vanilla RDS account. We didn=E2=80=99t = set any special permissions. 

Let me know if you want check any = specific permissions. Here are all the permissions I know of,

SELECT =
grantee, privilege_type FROM information_schema.role_table_grants WHERE =
table_name=3D'assets_copy';
= grantee | privilege_type
----------+----------------
postgres | INSERT
postgres | SELECT
postgres | UPDATE
postgres | DELETE
postgres | TRUNCATE
postgres | REFERENCES
postgres | TRIGGER
(7 rows)


Thanks!

Zhihong



= --Apple-Mail=_92FE80EB-7289-4804-A3A6-ADCC17FADBE4--