pg_dump: Dumping the contents of table "data_histories" failed: PQgetResult() failed. pg_dump: Error message from server: ERROR: canceling statement due to conflict with recovery DETAIL: User query might have needed to see row versions that must be removed. pg_dump: The command was: COPY public.data_histories (id, user_id, user_name, type, type_id, old_data, action, new_data, created_at, updated_at) TO stdout;
Ah, then it's just that your backup script is broken: it should have reported the error.
Please do not top-post.
Oleksandr - how about a helpful response? E.g suggesting that maybe increasing max_standby_streaming_delay might help? Goddamn! folk asking for help deserve better than just being told 'it is broken dickhead'...
The problem *is* that his backups are broken without him knowing it. Maybe increasing max_standby_streaming_delay is an answer, but maybe he would rather have occasional broken backups *which he knows about* then suffer the consequences of an increased max_standby_streaming_delay. Maybe hot_standby_feedback would be a better option, or maybe vacuum_defer_cleanup_age (but that is less likely).
The only thing we actually know with reasonable certainty is that his backup script is broken, and that this is bad. Randomly changing settings so that the brokenness is still there but just less obvious is more dangerous than helpful.