From: | 曾文旌 <wenjing(dot)zwj(at)alibaba-inc(dot)com> |
---|---|
To: | Prabhat Sahu <prabhat(dot)sahu(at)enterprisedb(dot)com> |
Cc: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, "蔡松露(子嘉)" <zijia(at)taobao(dot)com>, "Cai, Le" <le(dot)cai(at)alibaba-inc(dot)com>, "萧少聪(铁庵)" <shaocong(dot)xsc(at)alibaba-inc(dot)com> |
Subject: | Re: [Proposal] Global temporary tables |
Date: | 2020-04-20 09:31:43 |
Message-ID: | 54071B10-308E-4DA8-8EF6-C79B5EE09239@alibaba-inc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> 2020年4月17日 下午7:26,Prabhat Sahu <prabhat(dot)sahu(at)enterprisedb(dot)com> 写道:
>
> On Fri, Apr 17, 2020 at 2:44 PM 曾文旌 <wenjing(dot)zwj(at)alibaba-inc(dot)com <mailto:wenjing(dot)zwj(at)alibaba-inc(dot)com>> wrote:
>
> I improved the logic of the warning message so that when the gap between relfrozenxid of GTT is small,
> it will no longer be alarmed message.
>
> Hi Wenjing,
> Thanks for the patch(v26), I have verified the previous related issues, and are working fine now.
> Please check the below scenario VACUUM from a non-super user.
>
> -- Create user "test_gtt", connect it , create gtt, VACUUM gtt and VACUUM / VACUUM FULL
> postgres=# CREATE USER test_gtt;
> CREATE ROLE
> postgres=# \c postgres test_gtt
> You are now connected to database "postgres" as user "test_gtt".
> postgres=> CREATE GLOBAL TEMPORARY TABLE gtt1(c1 int);
> CREATE TABLE
>
> -- VACUUM gtt is working fine, whereas we are getting huge WARNING for VACUUM / VACUUM FULL as below:
> postgres=> VACUUM gtt1 ;
> VACUUM
> postgres=> VACUUM;
> WARNING: skipping "pg_statistic" --- only superuser or database owner can vacuum it
> WARNING: skipping "pg_type" --- only superuser or database owner can vacuum it
> WARNING: skipping "pg_toast_2600" --- only table or database owner can vacuum it
> WARNING: skipping "pg_toast_2600_index" --- only table or database owner can vacuum it
>
> ... ...
> ... ...
>
> WARNING: skipping "_pg_foreign_tables" --- only table or database owner can vacuum it
> WARNING: skipping "foreign_table_options" --- only table or database owner can vacuum it
> WARNING: skipping "user_mapping_options" --- only table or database owner can vacuum it
> WARNING: skipping "user_mappings" --- only table or database owner can vacuum it
> VACUUM
I think this is expected, and user test_gtt does not have permission to vacuum the system table.
This has nothing to do with GTT.
Wenjing
>
> --
> With Regards,
> Prabhat Kumar Sahu
> EnterpriseDB: http://www.enterprisedb.com <http://www.enterprisedb.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2020-04-20 09:35:44 | Re: DETACH PARTITION and FOR EACH ROW triggers on partitioned tables |
Previous Message | 曾文旌 | 2020-04-20 09:29:11 | Re: [Proposal] Global temporary tables |