Hi there,
I created an alloy DB cluster and tried to change its settings using flag. I tried to set flags below:
After that, I ran a SQL query to confirm that above flags are working. The queries and results are below:
postgres=> SELECT name, setting FROM pg_settings where name = 'tcp_keepalives_count';
name | setting
----------------------+---------
tcp_keepalives_count | 0
(1 row)
postgres=> SELECT name, setting FROM pg_settings where name = 'max_connections';
name | setting
-----------------+---------
max_connections | 1500
(1 row)
postgres=>
As you can see, max_connections flag works well but tcp_keepalives_count flag does not work.
According to this document , tcp_keepalives_count flag is available and does not require a reboot.
Just in case, I rebooted a primary instance but this flag remained inoperative. How can I make this flag working?
Solved! Go to Solution.
Hi @kumards ,
Thank you for your reply, and sorry for late reply again.
It seems that your advice is really great, but I regret to inform you that our project using AlloyDB has been closed. So all resources that contain an AlloyDB cluster have been deleted, and I cannot try your advice. Sorry for that.
I really appreciate your and @christianpaula 's help.
Hi @yusaito,
Welcome to Google Cloud Community!
tcp_keepalives_count = 5
sudo service postgresql restart
SELECT name, setting FROM pg_settings WHERE name = 'tcp_keepalives_count';
Thank you
Thank you for your reply and I'm sorry for my late reply.
I understood your point, but can I access alloy DB instances using SSH?
In my understanding, alloy DB is a fully managed DB service so I think I cannot access its instances using SSH.
Thank you.
Hi @yusaito ,
Just to be sure, did you follow the steps in the following document to configure the flags?
https://cloud.google.com/alloydb/docs/instance-configure-database-flags
After you set a flag, you'll see a message like the following in the operations pop-up near the lower-right corner of the console:
After the database is update, you'll see a message like:
And the console will show the flag:
And you should be able to see the same value when you query the flag via psql:
postgres=> SELECT name, setting FROM pg_settings where name = 'tcp_keepalives_count';
name | setting
----------------------+---------
tcp_keepalives_count | 5
(1 row)
Hi @kumards ,
Thank you for your reply, and sorry for late reply again.
It seems that your advice is really great, but I regret to inform you that our project using AlloyDB has been closed. So all resources that contain an AlloyDB cluster have been deleted, and I cannot try your advice. Sorry for that.
I really appreciate your and @christianpaula 's help.