libpqwalreceiver: Convert to libpq-be-fe-helpers.h
authorAndres Freund <[email protected]>
Tue, 24 Jan 2023 03:25:23 +0000 (19:25 -0800)
committerAndres Freund <[email protected]>
Tue, 24 Jan 2023 03:25:23 +0000 (19:25 -0800)
commit728f86fec65537eade8d9e751961782ddb527934
tree1875d61da7df5c589f1f5f780acbb16f9f437bdb
parente4602483e95bebd4da31e4ea95dc5c7f715c1e4f
libpqwalreceiver: Convert to libpq-be-fe-helpers.h

In contrast to the changes to dblink and postgres_fdw, this does not fix a
bug, as libpqwalreceiver did already process interrupts.

Besides reducing code duplication, the conversion leads to libpqwalreceiver
now using reserving file descriptors for libpq connections. While not strictly
required for the use in walreceiver, we are also using libpqwalreceiver for
logical replication, where it does seem more important.

Even if we eventually decide to backpatch the prior commits, there'd be no
need to backpatch this commit, due to not fixing an active bug.

Reviewed-by: Thomas Munro <[email protected]>
Discussion: https://postgr.es/m/20220925232237[email protected]
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c