Closed
Description
The --no-superuser-check
does not work. When passed in as an option, it fails with:
pg_repack -k -U admin -d test -t foo
INFO: repacking table "public.foo"
ERROR: query failed: ERROR: must be superuser to use repack_apply function
DETAIL: query was: SELECT repack.repack_apply($1, $2, $3, $4, $5, $6)
ERROR: query failed: ERROR: must be superuser to use repack_drop function
DETAIL: query was: SELECT repack.repack_drop($1, $2)
ERROR: query failed: ERROR: must be superuser to use repack_drop function
DETAIL: query was: SELECT repack.repack_drop($1, $2)
ERROR: query failed: ERROR: must be superuser to use repack_drop function
DETAIL: query was: SELECT repack.repack_drop($1, $2)
ERROR: query failed: ERROR: must be superuser to use repack_drop function
DETAIL: query was: SELECT repack.repack_drop($1, $2)
Looking at the code - its failing here https://github.com/reorg/pg_repack/blob/master/lib/repack.c#L111
This always evaluates to the actual superuser status of the user.
I don't see superuser()
defined anywhere in pg_repack - so I presume that is coming in from Postgres includes.
Initial discussion in #201
Metadata
Metadata
Assignees
Labels
No labels