On Thu, 2020-06-18 at 10:09 +0300, Toomas Kristin wrote:
> What is difference between following error messages?
> 
> ERROR:  canceling statement due to conflict with recovery
> FATAL:  terminating connection due to conflict with recovery

One kills your database session, the other doesn't.

> I tried to correlate process termination on standby and vacuuming on master.
> 
> Here is a sample timeline
> 1) 2020-06-17 22:45:42 - Last vacuuming before session
> 2) 2020-06-18 01:01:12 - Session was started at standby
> 3) 2020-06-18 01:27:53 - Session was terminated at standby
> 4) 2020-06-18 02:59:32 - Next vacuuming
> 
> Based on that I would say there is no correlation between vacuuming and 
> process termination.
> 
> How can I identify where is the conflict that stops replication and forces to 
> terminate a query on standby host?

It need not be caused by VACUUM; look which counter in
"pg_stat_database_conflicts" has increased.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



Reply via email to