Introduce --no-superuser-check option.

The current client checks for superuser before attempting to
execute pg_repack commands. In Amazon RDS, customers are given
access to a psuedo-superuser role called rds_superuser, but they
are not given access to superuser. However, rds_superusers will
otherwise have the ability to execute pg_repack commands in RDS.

This change introduces the --no-superuser-check option in the
client code so that users can disable the client-side superuser
checks.
This commit is contained in:
Nathan Bossart
2017-02-15 03:15:03 +00:00
parent dfbedb63d9
commit 168676b3b6
2 changed files with 11 additions and 0 deletions

View File

@ -128,6 +128,7 @@ Options:
-x, --only-indexes move only indexes of the specified table
-T, --wait-timeout=SECS timeout to cancel other backends on conflict
-Z, --no-analyze don't analyze at end
-k, --no-superuser-check skip superuser checks in client
Connection options:
-d, --dbname=DBNAME database to connect
@ -210,6 +211,10 @@ Reorg Options
Disable ANALYZE after a full-table reorganization. If not specified, run
ANALYZE after the reorganization.
``-k``, ``--no-superuser-check``
Skip the superuser checks in the client. This setting is useful for using
pg_repack on platforms that support running it as non-superusers.
Connection Options
^^^^^^^^^^^^^^^^^^