CSV export with replication

142 views
Skip to first unread message

rafael valenzuela moraleda

unread,
Apr 7, 2020, 1:05:45 PM4/7/20
to Google Cloud SQL discuss
Hi all,
I've this error when try to export tables to csv :
  • ERROR:  canceling statement due to conflict with recovery
  • DETAIL:  User query might have needed to see row versions that must be removed
Normally fix it when active this flag hot_standby_feedback  but I cant't because I shoolbe no a super user  , any idea?
Thanks

yananc

unread,
Apr 8, 2020, 12:38:39 AM4/8/20
to Google Cloud SQL discuss

Hi, 


Configuring database flags requires corresponding roles / permissions. I suggest you contact the Cloud SQL Administrator of the instance to apply for the privilege in order to complete the operation. 


Hope it helps!


rafael valenzuela moraleda

unread,
Apr 8, 2020, 5:30:41 AM4/8/20
to Google Cloud SQL discuss
Hi, 
Thanks for your reply, I saw the official documentation and I can't change this flag link [1]. I tried another approach with "gcloud sql export csv" but I have other error

ERROR: (gcloud.sql.export.csv) [ERROR_RDBMS] system error occurred pre-export

Thanks 


[1] https://cloud.google.com/sql/docs/postgres/flags#list-flags-postgres

Olu

unread,
Apr 9, 2020, 9:36:57 AM4/9/20
to Google Cloud SQL discuss
Hello, Rafael

There are a number of reasons why the error may have been returned. In fact, a similar issue reported in the past was traced to the amount of workloads on the CloudSQL instance at the time. Also, the issue sometimes was found to be transient as there were times observed in the past that restarting the Instance resolves the issue. For better troubleshooting of the issue, which may involve reviewing configurations on your Project, I recommend you contact the GCP Support Engineers[1] or if you think this issue is a bug and you are using the appropriate User account but it is failing, then open an issue using this link[2]. 

About the flag, hot_standby_feedback, from the information provided on this CloudSQL for Postgres page[3], the flag is actually supported. I did a test on my test environment and I was able to successfully add the flag without any additional access or permission. If you can't change the flag, can you provide information about your experience? Do you have an error reported or the field is grayed out? 

This information will be helpful to understand what may be the cause of your inability to change the flag and possibly, the same reason may be responsible for the failing export using your user account.  

rafael valenzuela moraleda

unread,
Apr 9, 2020, 1:47:37 PM4/9/20
to Google Cloud SQL discuss
Hi Olu:
My comment below.
Thanks 


El jueves, 9 de abril de 2020, 15:36:57 (UTC+2), Olu escribió:
Hello, Rafael

There are a number of reasons why the error may have been returned. In fact, a similar issue reported in the past was traced to the amount of workloads on the CloudSQL instance at the time. Also, the issue sometimes was found to be transient as there were times observed in the past that restarting the Instance resolves the issue. For better troubleshooting of the issue, which may involve reviewing configurations on your Project, I recommend you contact the GCP Support Engineers[1] or if you think this issue is a bug and you are using the appropriate User account but it is failing, then open an issue using this link[2]. 
I already fixed the error were the permissions. But I'll check the links and take note for future problems 

About the flag, hot_standby_feedback, from the information provided on this CloudSQL for Postgres page[3], the flag is actually supported. I did a test on my test environment and I was able to successfully add the flag without any additional access or permission. If you can't change the flag, can you provide information about your experience? Do you have an error reported or the field is grayed out? 
 i thing was an alter table "ALTER SYSTEM SET hot_standby_feedback TO on"  maybe need to execute the command.

Olu

unread,
Apr 10, 2020, 9:44:03 AM4/10/20
to Google Cloud SQL discuss
Rafael, 

Quite rightly, setting the flag by using the Alter SQL command requires the SUPER USER access, which is not available with the CloudSQL[1]. The flag, hot_standby_feedback however should work as a viable alternative. 

I am glad to know that you were able resolve the permission issue. 

Reply all
Reply to author
Forward
0 new messages