Skip to content

Instantly share code, notes, and snippets.

@blackandred
Created November 25, 2019 19:35
Show Gist options
  • Save blackandred/03882e66917c62cda14f42f4ce7d8844 to your computer and use it in GitHub Desktop.
Save blackandred/03882e66917c62cda14f42f4ce7d8844 to your computer and use it in GitHub Desktop.
Debug PostgreSQL replication
#!/bin/bash
#
# Perform a test replication into the /tmp/wal-test directory
# This command will tell you what is wrong with the replication
#
pg_receivewal -h 127.0.0.1 -p 5444 --user replication -D /tmp/wal-test/
@blackandred
Copy link
Author

blackandred commented Nov 25, 2019

FAQ:

  1. Where to put recovery.conf?
    Put it to the directory shown by SHOW data_directory;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment