Sample Header Ad - 728x90

Do long running queries get dropped when you restart the PostgreSQL instance?

0 votes
1 answer
81 views
Maybe this is a very basic question, but I want to be sure. I am upgrading an RDS cluster with a blue green deployment. I was checking the cluster, following the AWS guidelines, and saw a bunch of active connections. psql -d postgres -c “SELECT * FROM pg_stat_activity WHERE (now() - pg_stat_activity.query_start) > interval ‘2 minutes’” shows like 60 active queries. In one of our first upgrade steps, we have to restart the instance for a parameter group change. I would like to know if doing so will drop all these active connections. Most of them are idle, and almost all of them are SELECT statements, not DDL or INSERT/UPDATE queries. I am worried that if the connections are not dropped, it will affect the replication process somehow.
Asked by GBT55 (3 rep)
Jan 20, 2025, 03:15 PM
Last activity: Jan 20, 2025, 03:27 PM