]> granicus.if.org Git - postgresql/commit
Rethink the way walreceiver is linked into the backend. Instead than shoving
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 20 Jan 2010 09:16:24 +0000 (09:16 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 20 Jan 2010 09:16:24 +0000 (09:16 +0000)
commit32bc08b1d45d898aabdeeed09bcf1c2a407bbbed
treeb471343c464562c72ce814d9e2ffaa3d99ead31c
parenteb210ce85a6326412f2a35eb416d92801cfe997d
Rethink the way walreceiver is linked into the backend. Instead than shoving
walreceiver as whole into a dynamically loaded module, split the
libpq-specific parts of it into dynamically loaded module and keep the rest
in the main backend binary.

Although Tom fixed the Windows compilation problems with the old walreceiver
module already, this is a cleaner division of labour and makes the code
more readable. There's also the prospect of adding new transport methods
as pluggable modules in the future, which this patch makes easier, though for
now the API between libpqwalreceiver and walreceiver process should be
considered private.

The libpq-specific module is now in src/backend/replication/libpqwalreceiver,
and the part linked with postgres binary is in
src/backend/replication/walreceiver.c.
src/Makefile
src/backend/bootstrap/bootstrap.c
src/backend/replication/Makefile
src/backend/replication/README
src/backend/replication/libpqwalreceiver/Makefile [moved from src/backend/replication/walreceiver/Makefile with 60% similarity]
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c [new file with mode: 0644]
src/backend/replication/walreceiver.c [moved from src/backend/replication/walreceiver/walreceiver.c with 66% similarity]
src/backend/replication/walreceiverfuncs.c
src/include/replication/walreceiver.h