PostgreSQL ERROR: canceling statement due to conflict with recovery

后端 未结 8 848
盖世英雄少女心
盖世英雄少女心 2020-12-02 04:22

I\'m getting the following error when running a query on a PostgreSQL db in standby mode. The query that causes the error works fine for 1 month but when you query for more

8条回答
  •  盖世英雄少女心
    2020-12-02 04:48

    As stated here about hot_standby_feedback = on :

    Well, the disadvantage of it is that the standby can bloat the master, which might be surprising to some people, too

    And here:

    With what setting of max_standby_streaming_delay? I would rather default that to -1 than default hot_standby_feedback on. That way what you do on the standby only affects the standby


    So I added

    max_standby_streaming_delay = -1
    

    And no more pg_dump error for us, nor master bloat :)

    For AWS RDS instance, check http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html

提交回复
热议问题