HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlModerate

How to alter system on AWS RDS?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
systemawshowrdsalter

Problem

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?

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 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.