Failed test 'pg_recvlogical acknowledged changes, nothing pending on slot'

Thomas Munro <thomas.munro@enterprisedb.com>

From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-01-28T21:09:49Z
Lists: pgsql-hackers
Hello,

I saw a one-off test failure that might be trying to tell us something:

https://travis-ci.org/postgresql-cfbot/postgresql/builds/334334417

#   Failed test 'pg_recvlogical acknowledged changes, nothing pending on slot'
#   at t/006_logical_decoding.pl line 91.
#          got: 'BEGIN
# table public.decoding_test: INSERT: x[integer]:1 y[text]:'1'
# table public.decoding_test: INSERT: x[integer]:2 y[text]:'2'
# table public.decoding_test: INSERT: x[integer]:3 y[text]:'3'
# table public.decoding_test: INSERT: x[integer]:4 y[text]:'4'
# COMMIT'
#     expected: ''
# Looks like you failed 1 test of 16.

This occurred when testing master (010123e) with the patch from
https://www.postgresql.org/message-id/1bd396a9-4573-55ad-7ce8-fe7adffa1bd9%40uni-muenster.de
applied, but I don't think the patch has anything to do with it
because it doesn't touch anything outside contrib/pg_stat_statements.

-- 
Thomas Munro
http://www.enterprisedb.com


Commits

  1. Fix pg_recvlogical avoidance of superfluous Standby Status Update.

  2. In successful pg_recvlogical, end PGRES_COPY_OUT cleanly.