Refactor libpqwalreceiver

The whole walreceiver API is now wrapped into a struct, like most of our
other loadable module APIs.  The libpq connection is no longer a global
variable in libpqwalreceiver.  Instead, it is encapsulated into a struct
that is passed around the functions.  This allows multiple walreceivers
to run at the same time.

Add some rudimentary support for logical replication connections to

These changes are mostly cosmetic and are going to be useful for the
future logical replication patches.

From: Petr Jelinek <>



Modified Files
.../libpqwalreceiver/libpqwalreceiver.c            | 266 ++++++++++++---------
src/backend/replication/walreceiver.c              |  59 +++--
src/include/replication/walreceiver.h              |  83 +++++--
3 files changed, 235 insertions(+), 173 deletions(-)

Sent via pgsql-committers mailing list (
To make changes to your subscription:

Reply via email to