snippetsqlModerate
How to alter system on AWS RDS?
Viewed 0 times
systemawshowrdsalter
Problem
I need to run
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
How do I run that alter system query?
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 commandHow do I run that alter system query?
Solution
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
Check this link for more details, please:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html
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
Context
StackExchange Database Administrators Q#228807, answer score: 12
Revisions (0)
No revisions yet.