Tuesday, June 12, 2018

[google-cloud-sql-discuss] Re: Without superuser, how can I terminate rogue sessions?

In pg_stat_activity, I can only see username, dbname and application. It doesn't show me client hostname or address, connection or query start time, or the query they are running. This is all important information to be able to troubleshoot a problem.

I'm not concerned with inactive sessions for now, I'm talking about runaway zombie sessions that need to be killed.

Don.

On Tuesday, June 12, 2018 at 8:35:11 AM UTC-5, Kenworth (Google Cloud Platform) wrote:
True, the PostgreSQL user does not have the SUPERUSER attribute. You can show connections and threads to see the processes that are running on your database. Example:

select * from pg_stat_activity;

If you meant long-lived unused connections for rogue sessions, the connections with a GCE instance time out after 10 minutes of inactivity by default. 

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/05ae6337-ca5a-48b5-a296-42e0e41e0042%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment