Refactor sending of DataRow messages in replication protocol
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 6 Jul 2022 06:28:02 +0000 (08:28 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 6 Jul 2022 06:42:56 +0000 (08:42 +0200)
commit16d52fc89dbe8394ed318521e076f08fd2e4bf8c
tree382dadb660cce797b66408e9daee0bbbe71fadf8
parentb55f62abb2c2e07dfae99e19a2b3d7ca9e58dc1a
Refactor sending of DataRow messages in replication protocol

Some routines open-coded the construction of DataRow messages.  Use
TupOutputState struct and associated functions instead, which was
already done in some places.

SendTimeLineHistory() is a bit more complicated and isn't converted by
this.

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/7e4fdbdc-699c-4cd0-115d-fb78a957fc22@enterprisedb.com
src/backend/access/common/printsimple.c
src/backend/replication/basebackup_copy.c