Book Image

PostgreSQL 9 Administration Cookbook - Second Edition

Book Image

PostgreSQL 9 Administration Cookbook - Second Edition

Overview of this book

Table of Contents (19 chapters)
PostgreSQL 9 Administration Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Archiving transaction log data


Starting with PostgreSQL 9.2, streaming replication 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_receivexlog: This is available from PostgreSQL 9.2 onwards. It 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 from 9.4 onwards.

  • pg_recvlogical: This is available from PostgreSQL 9.4 onwards. It archives the results of 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...