Can we set the query timeout option in the AWS Postgres instance?
I know we can do it locally in the configuration file if we have a local setup but not sure about AWS RDS.
Any help would be appreciated because due to the above issue CPU utilization is increasing.
You can achieve it by creating Parameter groups in AWS RDS
Please follow below steps.
Go to AWS Console -> Amazon RDS
Select Parameter Group to create parameter group
select appropriate version of Postgres,provide group name and click on create.
Now select the created Parameter Group and search the parameter as statement_timeout
Click on Edit Parameter button and set the value inside the Values box
Save changes.
Now while creating or modifying the database select newly created parameter group.
Related
I need to change the rds.logical_replication parameter to 1 in order to get wal_level to logical.
I already changed the rds.logical_replication parameter, but when i run SHOW rds.logical_replication on my writer instance still off. Already tried applying the DB Cluster Parameter Group to the regional cluster and only to the writer instance.
I have 1 writer instance and 1 reader instance but they are serverless.
Is the ploblem that Aurora is serverless?
How can i change the parameter correctly to see the changes in the writer instance?
I tried changing the rds.logical_replication to 1 in the DB Cluster Parameter Group and applied to the Regional Cluster.
I tried changing the rds.logical_replication to 1 in the DB Cluster Parameter Group and applied only to the writer instance.
I tried to make a Parameter Group with the need values, but rds.logical_replication doesn't exist in the Parameter Group configuration.
Edit: I also rebooted the service.
I'm expecting to run SHOW rds.logical_replication and the variable is ON.
Aurora PostgreSQL–based DB clusters running Aurora Serverless v1 have the following limitations:
The logical replication feature available in Amazon RDS PostgreSQL and Aurora PostgreSQL isn't supported.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html
But for Aurora Serverless v2 is supported, please, be sure that
Cluster Parameter Group is applied correctly and assign Cluster
Parameter Group to Cluster level. Follow next procedure to enable
rds.logical_replication. Stop and Start the Cluster to use new values.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Replication.Logical.html#AuroraPostgreSQL.Replication.Logical.Configure
https://aws.amazon.com/premiumsupport/knowledge-center/rds-postgresql-use-logical-replication/
I am creating a DMS task to load data from RDS postgre to AWS s3. The DMS is creating a replication slot by default having a long alpha numeric slot name . Both Full load and CDC works fine with it .
I want to provide a useful name to the slot so that I can identify for which table it is being used for ?
Now when I try to create a slot with the a custom name using the following query :
select * FROM pg_create_logical_replication_slot('slotname', 'test_decoding');
It is getting created. But the active flag is false .
select * from pg_replication_slots
Is there any way to make it active ?
And provide the slotName in DMS Endpoint configuration in Extra connection attributes slotName=slotname
I have an Aurora cluster on which I'm trying to globally disable parallel queries (so that I can safely lean on SET for configuration parameters to handle multi-tenant-edness...), but don't seem to be able to get AWS to cooperate.
I have both modified an existing parameter group, and tried an entirely new parameter group, both times setting max_parallel_workers_per_gather to 0 via the RDS console.
However, once the modification is complete, when I then connect to the database and query this with SHOW max_parallel_workers_per_gather, I find that the value is still set to the default of 2.
Am I doing something wrong? Is there another way to set this parameter globally?
Thanks!
This query should tell you where the setting comes from:
SELECT setting, source, sourcefile, sourceline
FROM pg_settings
WHERE name = 'max_parallel_workers_per_gather';
I am in the process of setting up Debezium to work with AWS Aurora Postgres (postgres version 12.6).
For Debezium to work, the WAL (Write-ahead-logging) must be set to 'logical' and not 'replica'.
On AWS, this would require a DBA to set the rds.logical_replication parameter in the parameter group to be set to 1.
The above was done. The database instance was restarted.
To verify that the WAL level was changed to 'logical', I ran the following query:
show wal_level.
However, after running this query in postgres on the target database the result showed replica.
I further looked at the log events in the AWS management console and I saw these log events.
Would anyone have an idea why this might be? There is another environment where we were able to successfully set the rds.logical_replication to 1 and following a database restart, the WAL was set to logical. But for our main environment this is not the case. Looking at the parameter groups, between these two environments, they are the same.
Any help/ advice is appreciated. thanks.
Ok after contacting the AWS support I got the information that the parameter "rds.logical_replication=1" is only active on the instance that has the Writer role (open for read-write). When you set this parameter you will have to use the writer instance for logical replication. You can connect to the writer instance either via Cluster endpoint (recommended) or instance endpoint.
I was checking the read-only instance with SHOW wal_level; but in fact it was set on the read/write instance !!!
I recently changed the machine type for a Google Cloud SQL instance, but it did not automatically change the machine type for the failover replica. When I edit the replica, the button to change the machine type is greyed out. Does anyone know how I can change the machine type for the replica?
At the moment, it's not possible via the UI.
Until that's fixed, you can use gcloud to perform the change:
cloud sql instances patch --project=my-project my-instance --tier new-tier