pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Patrick Hemmer <postgresql@stormcloud9.net>
To: pgsql-general@lists.postgresql.org
Subject: max_standby_streaming_delay not enforced
Date: Tue, 10 Jul 2018 14:37:57 -0400
Message-ID: <f9254d52-f99c-8569-2ee7-2f383b685627@stormcloud9.net> (raw)

I ran into an issue the other day on one of my database clusters where
it appears a replica had a transaction open for almost 24 hours. This
was causing stale data on the replica (as observed by queries against
the db), as well as tuple bloat on the master (due to
`hot_standby_feedback=on` and vacuum not cleaning them up).
The part that is confusing me is that I have
`max_standby_streaming_delay=30s`, and from all the documentation I can
find, this should have resulted in the transaction being killed.

The replica has since been restarted, so I cannot gather any information
about current state. However I have monitoring and logging on many of
the postgres stats, so I might be able to retrieve some information if
requested.
I have also tried reproducing the issue in a lab, but have so far been
unable to.

Are there any scenarios where a replica might still delay replaying the
transaction log past the value configured in `max_standby_streaming_delay`?

For version information, I am running PostgreSQL 9.6.3 on CentOS/7

-Patrick

Message-ID: <f9254d52-f99c-8569-2ee7-2f383b685627@stormcloud9.net>
Permalink:  ../f9254d52-f99c-8569-2ee7-2f383b685627@stormcloud9.net/
Also on:    postgresql.org/message-id/f9254d52-f99c-8569-2ee7-2f383b685627@stormcloud9.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: postgresql@stormcloud9.net
  Subject: Re: max_standby_streaming_delay not enforced
  In-Reply-To: <f9254d52-f99c-8569-2ee7-2f383b685627@stormcloud9.net>
  References: <f9254d52-f99c-8569-2ee7-2f383b685627@stormcloud9.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox