postgresql/src
Michael Paquier 10ffe0fa72 Fix crash in WAL sender when starting physical replication
Since database connections can be used with WAL senders in 9.4, it is
possible to use physical replication.  This commit fixes a crash when
starting physical replication with a WAL sender using a database
connection, caused by the refactoring done in 850196b.

There have been discussions about forbidding the use of physical
replication in a database connection, but this is left for later,
taking care only of the crash new to 13.

While on it, add a test to check for a failure when attempting logical
replication if the WAL sender does not have a database connection.  This
part is extracted from a larger patch by Kyotaro Horiguchi.

Reported-by: Vladimir Sitnikov
Author: Michael Paquier, Kyotaro Horiguchi
Reviewed-by: Kyotaro Horiguchi, Álvaro Herrera
Discussion: https://postgr.es/m/CAB=Je-GOWMj1PTPkeUhjqQp-4W3=nW-pXe2Hjax6rJFffB5_Aw@mail.gmail.com
Backpatch-through: 13
2020-06-08 10:12:31 +09:00
..
backend Fix crash in WAL sender when starting physical replication 2020-06-08 10:12:31 +09:00
bin Rethink definition of cancel.c's CancelRequested flag. 2020-06-07 13:07:34 -04:00
common Run pgindent with new pg_bsd_indent version 2.1.1. 2020-05-16 11:54:51 -04:00
fe_utils Rethink definition of cancel.c's CancelRequested flag. 2020-06-07 13:07:34 -04:00
include Fix crash in WAL sender when starting physical replication 2020-06-08 10:12:31 +09:00
interfaces Try to read data from the socket in pqSendSome's write_failed paths. 2020-06-07 13:44:13 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Clear some style deviations. 2020-05-21 08:31:16 -07:00
port Clear some style deviations. 2020-05-21 08:31:16 -07:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Fix crash in WAL sender when starting physical replication 2020-06-08 10:12:31 +09:00
timezone Run pgindent with new pg_bsd_indent version 2.1.1. 2020-05-16 11:54:51 -04:00
tools MSVC: Avoid warning when testing a TAP suite without PROVE_FLAGS. 2020-06-07 16:27:17 -07:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Update Unicode data to Unicode 13.0.0 and CLDR 37 2020-04-24 09:52:59 +02:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00