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