Re: Queries in replica are failing

Поиск
Список
Период
Сортировка
От Matt Pearson
Тема Re: Queries in replica are failing
Дата
Msg-id 3fe3d1ea-6bba-44bd-ac66-d8730d643fbe@pythian.com
обсуждение исходный текст
Ответ на Queries in replica are failing  (Siraj G <tosiraj.g@gmail.com>)
Список pgsql-admin

Hi,

I would probably use "hot_standby_feedback" rather than change the delay parameters, unless you want to have the read replica (Standby) actually to operate some time behind the primary, for some reason (like having a copy of the data an hour old to fix mistakes on the primary).

https://postgresqlco.nf/doc/en/param/hot_standby_feedback/

The hot_standby_feedback parameter sends feedback to the primary, so the transaction is less likely to be cancelled.  The only draw back is that is can cause some bloat on the primary database.

Regards,

Matt


On 16/05/2024 13:01, Siraj G wrote:
Hello -

Queries in replica instance are failing with the error "cancelling statement due to conflict with recovery". I was checking two parameters (max_standby_archive_delay and max_standby_streaming_delay)  which may allow the queries to run within the time defined in those.

Is it recommended to set those? Is there any other suggestion to tackle this?

Regards
Siraj

--



В списке pgsql-admin по дате отправления:

Предыдущее
От: Siraj G
Дата:
Сообщение: Queries in replica are failing
Следующее
От: ravi k
Дата:
Сообщение: Replication slot dropped in Bidirection rep: column addition