PSR can send transaction log data to a remote node, even if the node is not a full PostgreSQL server. This can be useful for archiving copies of transaction log data for various purposes.
PostgreSQL includes two client tools to stream data from the server to the client. The tools are designed using a pull model; that is, you run the tools on the node you wish the data to be saved on:
- pg_receivewal archives physical transaction log data (WAL files). This utility produces a straight copy of the original WAL files. Replication slots are recommended when using this tool.
- pg_recvlogical archives the results of the logical decoding of transaction log data. This utility produces a copy of the transformed data rather than physical WAL. Replication slots are required for this tool. You will need to use that with a logical decoding plugin.