Re: Erro conection close - Mailing list pgsql-admin

From Juan José Santamaría Flecha
Subject Re: Erro conection close
Date
Msg-id CAC+AXB1T-fJ3ShiYSGMpBKmk9=5F9Ym_7ysX7S2e2MwHSYwpNg@mail.gmail.com
Whole thread Raw
In response to Erro conection close  (Manuel Garcia <garcia.manuel1987@gmail.com>)
List pgsql-admin
On Thu, Oct 10, 2019 at 6:09 PM Manuel Garcia
<garcia.manuel1987@gmail.com> wrote:
>
> Boa tarde, gostaria de saber que erro estou tendo, tenho dois servidores um master um slave , com as mesmas
configurações.
>
> A aplicação que conecta recebe em média 200 consultas slave e 200 insert master por segundo.
>
> Mas só em um serviço o slave cancela e fecha. A conexão.
>
> Já pensei em fazer um delay na replicação mas interferia nas requisições em tempo real.
>
> DBD::Pg::st execute failed: ERROR:  canceling statement due to conflict with recovery
> DETAIL:  User query might have needed to see row versions that must be removed.
>
> DBD::Pg::st execute failed: server closed the connection unexpectedly
>
> DBD::Pg::st execute failed: no connection to the server at
>
>
> Se alguém já tive algum erro similar gostaria de alguma orientação.
>
> Desde já agradeço o seu tempo

The portuguese mailing list is pgsql-pt-geral, already in CC, so
please allow me to reply in english.

It looks like you are having problems with the parameter
'max_standby_archive_delay', as described in [1]:

max_standby_archive_delay: "When Hot Standby is active, this parameter
determines how long the standby server should wait before canceling
standby queries that conflict with about-to-be-applied WAL entries,
[...]. The default is 30 seconds."

More on the matter is also in [2].

Regards,

Juan José Santamaría Flecha

[1] https://www.postgresql.org/docs/current/runtime-config-replication.html
[2] https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-CONFLICT



pgsql-admin by date:

Previous
From: "Deepak Pahuja ."
Date:
Subject: Re: how to call a stored function on conflict
Next
From: Albert Shih
Date:
Subject: Strange behavior over WAN