Friday, May 14, 2021

[google-cloud-sql-discuss] Re: help for repeatedly executed sql for cloud sql postgres

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.

On Thursday, 13 May 2021 at 09:46:21 UTC-4 ho...@interactivelabs.co wrote:
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

--
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/696cff7f-27ab-4842-8b5f-9b8763fd1668n%40googlegroups.com.

No comments:

Post a Comment