Saturday, May 15, 2021

Re: [google-cloud-sql-discuss] Re: why i got these queries on log every 1-2 seconds ?

Can you double confirm the service account you use  ? it seems something related to the IAM not set properly. 
On Friday, May 14, 2021 at 1:37:17 PM UTC-4 ho...@interactivelabs.co wrote:
no, i think because there are too many roles. 
Any suggestions for max roles for best practices?

Thanks
hong


On Thu, May 13, 2021 at 4:15 PM 'David (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud...@googlegroups.com> wrote:

Hello,

Do you have pg_stat_statements enabled? Seems like something it would be logged if you do. 


On Thursday, May 13, 2021 at 9:46:21 AM UTC-4 ho...@interactivelabs.co wrote:
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 happen ? how to stop it ?

Thanks
hong

--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-sql-discuss/GDzR8uilu2c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/da2919ec-6c99-46f7-a830-b8cd684fd17dn%40googlegroups.com.

--
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/c203ef94-b5a0-4b31-b7b6-de432a6d23d2n%40googlegroups.com.

No comments:

Post a Comment