help for repeatedly executed sql for cloud sql postgres

19 views
Skip to first unread message

Hong Cheng

unread,
May 13, 2021, 9:46:21 AM5/13/21
to Google Cloud SQL discuss
hi all,

hi i got this sql run over and over in google cloud sql postgres:
WITH non_cloudsql_users AS (
SELECT * FROM pg_catalog.pg_user WHERE usename NOT LIKE 'cloudsql%'),
iam_roles AS (
SELECT pg_catalog.pg_has_role(usename, 'cloudsqliamuser', 'member') AS is_iam_user,
pg_catalog.pg_has_role(usename, 'cloudsqliamserviceaccount', 'member') AS is_svc_acct
FROM non_cloudsql_users)
SELECT pg_catalog.SUM(is_iam_user::int),
pg_catalog.SUM(is_svc_acct::int),
pg_catalog.SUM((NOT(is_iam_user OR is_svc_acct))::int),
current_timestamp
FROM iam_roles

Why this happened ? how to stop it ?

Thanks
hong

George (Cloud Platform Support)

unread,
May 14, 2021, 11:40:01 AM5/14/21
to Google Cloud SQL discuss
Is this a query that starts again and again for no reason at all? Is this a single query that runs forever and you cannot stop? In both cases, best place to ask would be on programmer forums such as stackoverflow. This discussion group is oriented more towards general opinions, trends, and issues of general nature touching the App Engine. For MySQL intricacies, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help.
Reply all
Reply to author
Forward
0 new messages