Recovery conflict message lost in user session for 9.3

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Recovery conflict message lost in user session for 9.3
Date: 2015-11-26 08:31:13
Message-ID: 5656C351.1070300@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I noticed this while teaching a Postgres course.

I'm using 9.3.10 (but suspect all/most prev 9.3.x the same):

Suppose I have a primary/standby streaming replication setup.

Session 1 (standby):

bench=# BEGIN;
BEGIN
bench=# DECLARE hcur CURSOR FOR select * FROM pgbench_history;
DECLARE CURSOR
bench=# fetch hcur;
tid | bid | aid | delta | mtime | filler
-----+-----+--------+-------+----------------------------+--------
90 | 98 | 499159 | 4384 | 2015-11-26 20:28:19.502997 |
(1 row)

Session 2 (primary):
bench=# UPDATE pgbench_history SET filler = 'filled';
UPDATE 3159

Session 1 (standby - wait > 30s):

bench=# fetch hcur;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

Now in the standby log I see:
FATAL: terminating connection due to conflict with recovery
DETAIL: User query might have needed to see row versions that must be
removed.
HINT: In a moment you should be able to reconnect to the database and
repeat your command.

However this is not transmitted to the standby user's session, so
leaving an unhelpful message about why the session got killed. Testing
with 9.1, 9.4, 9.5, 9.6 (noted not tested 9.2) seems to show that these
versions get the more descriptive message to the standby user's session
ok. Might be good to have 9.3 behave the same.

regards

Mark

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message ntpt 2015-11-26 12:15:58 BUG #13785: Postgresql encoding screw-up
Previous Message Thomas Kellerer 2015-11-26 06:54:13 Re: BUG #13784: cannot create table with table name testtbl