pgsql: Refactor libpqwalreceiver - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Refactor libpqwalreceiver
Date
Msg-id E1cCcfd-0008G6-32@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Refactor libpqwalreceiver  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
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
libpqwalreceiver.

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

From: Petr Jelinek <petr@2ndquadrant.com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/78c8c814390f14398e8fd43fe7282cb2e260b50f

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(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Add aggregate_with_argtypes and use it consistently
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Use latch instead of select() in walreceiver