01 Run DescribeDBInstances command (OSX/Linux/UNIX) with custom output filters to list the ID and the database engine of each RDS database instance available within your Alibaba Cloud account:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
aliyun rds DescribeDBInstances
--output cols=DBInstanceId,Engine
02 The command output should return a list with the requested instance identifiers:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
DBInstanceId | Engine
------------ | ------
pgm-abcd1234abcd1234 | PostgreSQL
pgm-1234abcd1234abcd | PostgreSQL
03 Run DescribeParameters command (OSX/Linux/UNIX) with the name of the RDS PostgreSQL database instance that you want to examine as the identifier parameter, to describe the parameters configured for the selected database instance:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
aliyun rds DescribeParameters
--DBInstanceId pgm-abcd1234abcd1234
04 The command output should return the list with the database parameters available for the instance:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
{
"RunningParameters": {
"DBInstanceParameter": [
{
"ParameterValue": "Europe/London",
"ParameterName": "timezone",
"ParameterDescription": "timezone"
},
{
"ParameterValue": "on",
"ParameterName": "log_connections",
"ParameterDescription": "Logs each successful connection."
},
...
{
"ParameterValue": "off",
"ParameterName": "log_duration",
"ParameterDescription": "Logs the duration of each completed SQL statement."
},
...
{
"ParameterValue": "on",
"ParameterName": "log_disconnections",
"ParameterDescription": "Logs end of a session, including duration."
},
{
"ParameterValue": "on",
"ParameterName": "synchronize_seqscans",
"ParameterDescription": "Enable synchronized sequential scans."
}
]
},
"EngineVersion": "16.0",
"RequestId": "1234ABCD-1234-ABCD-1234-ABCD1234ABCD",
"ConfigParameters": {
"DBInstanceParameter": []
},
"Engine": "PostgreSQL"
}
Identify the parameter with the
"ParameterName" value set to
"log_duration". Check the
"ParameterValue" attribute value to determine the current status of the
log_duration parameter. If
"ParameterValue" is set to
off, as shown in the example above, the "log_duration" database parameter is not enabled for the selected PostgreSQL database instance.
05 Repeat steps no. 3 and 4 for each database instance created with RDS within your Alibaba Cloud account.