5

I need to run

ALTER SYSTEM SET track_activity_query_size = 16384;

So I can see the contents of some long running queries (I can only see the beginning at the default size), but when I try to do that in pgAdmin on my RDS instance I get the error

ERROR:  must be superuser to execute ALTER SYSTEM command

How do I run that alter system query?

2
  • Which part of the error message seems unclear?
    – mustaccio
    Commented Feb 4, 2019 at 14:09
  • @mustaccio I understand the error message. I just don't know how to run a command as the superuser in RDS. I'll try out detzu's answer when I get home!
    – CorayThan
    Commented Feb 4, 2019 at 19:13

1 Answer 1

12

The RDS Postgres instance has a parameter group. Check in RDS colsole what parameter group is defined: RDS -> Databases -> choose your db -> Configuration -> parameter group. If it's the default one, create a new one and change track_activity_query_size to the value you need. Apply the new parameter group or change the actual one. The parameter is static so a restart is needed in any case.

Check this link for more details, please: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.