Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cannot export with gcloud cli or console

I'm unable to export my databases using gcloud or the console since few days without any other issue. The error is pg_dump: error: query failed: ERROR: permission denied for table xyz on all the table on all the databases. It's not a problem of missing permission with the serviceaccount, i've checked that.

If i grant again cloudsqlimportexport user i can export. But i've a lot of databases and schema. I can use pg_dump from my user.

How is that possible ? Is there a way to resolve that ?

Thanks

Solved Solved
0 2 629
1 ACCEPTED SOLUTION

Thanks to your answer.

I'm aware of this it's why i don't understand how suddenly `cloudsqlimportexport` could not more export neither by cli nor on console.

But, it was few days ago and now it suddenly works again (i did nothing and let my cron trying). So it was probably an internal issue that was resolved by support.

I'm surprise to don't see anythings in the logs, no operations either !

View solution in original post

2 REPLIES 2

Hi @wilk,

Welcome to Google Cloud Community!

According to this documentation on default PostgreSQL users:

A default cloudsqlimportexport user is created with the minimal set of privileges needed for CSV import/export operations. You can create your own users to perform these operations, but if you don't, the default cloudsqlimportexport user is used. The cloudsqlimportexport user is a system user and customers cannot directly use it.

You can also check the following documentation on import/export data best practices:

Thanks to your answer.

I'm aware of this it's why i don't understand how suddenly `cloudsqlimportexport` could not more export neither by cli nor on console.

But, it was few days ago and now it suddenly works again (i did nothing and let my cron trying). So it was probably an internal issue that was resolved by support.

I'm surprise to don't see anythings in the logs, no operations either !