From 4fc316c64965ecd12d52c2be5d213abc9926a4c9 Mon Sep 17 00:00:00 2001 From: Anirban-Chand Date: Tue, 14 Oct 2025 13:03:16 +0530 Subject: [PATCH 1/5] pg_receivewal: add page --- pages/common/pg_receivewal.md | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pages/common/pg_receivewal.md diff --git a/pages/common/pg_receivewal.md b/pages/common/pg_receivewal.md new file mode 100644 index 00000000000000..cb1c0c7c3b6929 --- /dev/null +++ b/pages/common/pg_receivewal.md @@ -0,0 +1,48 @@ +# pg_receivewal + +> Streams the write-ahead log from a running PostgreSQL cluster. +> More information: . + +- Stream WAL to a local directory (minimum required): + + `pg_receivewal -D {{directory}}` + +- Same as above, specify host, port, username: + + `pg_receivewal -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` + +- Include verbose output: + + `pg_receivewal --verbose -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` + +- Use replication slot (create-if-needed): + + `pg_receivewal --slot={{slot_name}} --create-slot -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` + +- Drop a replication slot: + + `pg_receivewal --slot={{slot_name}} --drop-slot -h {{host}} -p {{port}} -U {{username}}` + +- Stop at a given WAL position (LSN): + + `pg_receivewal --endpos={{lsn}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` + +- Control looping on failure: + + `pg_receivewal --no-loop -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` + +- Flush data synchronously (force WAL writes immediately): + + `pg_receivewal --synchronous -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` + +- Disable forcing sync to disk (faster but riskier): + + `pg_receivewal --no-sync -D {{directory}}` + +- Compress WAL output (gzip, level 0–9): + + `pg_receivewal --compress={{level}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` + +- Set status reporting interval: + + `pg_receivewal --status-interval={{seconds}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` From 5a61cb383fcc66c7ddb133c2be20071d4c1e99d6 Mon Sep 17 00:00:00 2001 From: Anirban-Chand Date: Tue, 14 Oct 2025 13:49:20 +0530 Subject: [PATCH 2/5] pg_receivewal: tldr-lint checks --- pages/common/pg_receivewal.md | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/pages/common/pg_receivewal.md b/pages/common/pg_receivewal.md index cb1c0c7c3b6929..7199ab9724b7d9 100644 --- a/pages/common/pg_receivewal.md +++ b/pages/common/pg_receivewal.md @@ -5,44 +5,32 @@ - Stream WAL to a local directory (minimum required): - `pg_receivewal -D {{directory}}` +`pg_receivewal -D {{directory}}` -- Same as above, specify host, port, username: +- Same as above, specify host, port, username including verbose output: - `pg_receivewal -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` - -- Include verbose output: - - `pg_receivewal --verbose -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` +`pg_receivewal --verbose -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` - Use replication slot (create-if-needed): - `pg_receivewal --slot={{slot_name}} --create-slot -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` - -- Drop a replication slot: - - `pg_receivewal --slot={{slot_name}} --drop-slot -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --slot={{slot_name}} --create-slot -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` - Stop at a given WAL position (LSN): - `pg_receivewal --endpos={{lsn}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --endpos={{lsn}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` - Control looping on failure: - `pg_receivewal --no-loop -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --no-loop -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` - Flush data synchronously (force WAL writes immediately): - `pg_receivewal --synchronous -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` - -- Disable forcing sync to disk (faster but riskier): - - `pg_receivewal --no-sync -D {{directory}}` +`pg_receivewal --synchronous -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` - Compress WAL output (gzip, level 0–9): - `pg_receivewal --compress={{level}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --compress={{level}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` - Set status reporting interval: - `pg_receivewal --status-interval={{seconds}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --status-interval={{seconds}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` From dc2ca5299bd86025a883329d0759f77f2a58dce8 Mon Sep 17 00:00:00 2001 From: Anirban-Chand Date: Wed, 15 Oct 2025 10:49:08 +0530 Subject: [PATCH 3/5] pg_receivewal: Updated directory flag to {{[-D|--directory]}} --- pages/common/pg_receivewal.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/common/pg_receivewal.md b/pages/common/pg_receivewal.md index 7199ab9724b7d9..426216a68f7255 100644 --- a/pages/common/pg_receivewal.md +++ b/pages/common/pg_receivewal.md @@ -5,32 +5,32 @@ - Stream WAL to a local directory (minimum required): -`pg_receivewal -D {{directory}}` +`pg_receivewal {{[-D|--directory]}} {{directory}}` - Same as above, specify host, port, username including verbose output: -`pg_receivewal --verbose -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` +`pg_receivewal --verbose -h {{host}} -p {{port}} -U {{username}} {{[-D|--directory]}} {{directory}}` - Use replication slot (create-if-needed): -`pg_receivewal --slot={{slot_name}} --create-slot -h {{host}} -p {{port}} -U {{username}} -D {{directory}}` +`pg_receivewal --slot={{slot_name}} --create-slot -h {{host}} -p {{port}} -U {{username}} {{[-D|--directory]}} {{directory}}` - Stop at a given WAL position (LSN): -`pg_receivewal --endpos={{lsn}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --endpos={{lsn}} {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` - Control looping on failure: -`pg_receivewal --no-loop -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --no-loop {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` - Flush data synchronously (force WAL writes immediately): -`pg_receivewal --synchronous -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --synchronous {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` - Compress WAL output (gzip, level 0–9): -`pg_receivewal --compress={{level}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --compress={{level}} {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` - Set status reporting interval: -`pg_receivewal --status-interval={{seconds}} -D {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --status-interval={{seconds}} {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` From 77eb2927af0ffd243534472b5f26530ec33cc460 Mon Sep 17 00:00:00 2001 From: Anirban-Chand Date: Wed, 15 Oct 2025 11:15:27 +0530 Subject: [PATCH 4/5] pg_receivewal: added long options for command --- pages/common/pg_receivewal.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/common/pg_receivewal.md b/pages/common/pg_receivewal.md index 426216a68f7255..ab26fb08b7a52d 100644 --- a/pages/common/pg_receivewal.md +++ b/pages/common/pg_receivewal.md @@ -9,28 +9,28 @@ - Same as above, specify host, port, username including verbose output: -`pg_receivewal --verbose -h {{host}} -p {{port}} -U {{username}} {{[-D|--directory]}} {{directory}}` +`pg_receivewal {{[-v|--verbose]}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}} {{[-D|--directory]}} {{directory}}` - Use replication slot (create-if-needed): -`pg_receivewal --slot={{slot_name}} --create-slot -h {{host}} -p {{port}} -U {{username}} {{[-D|--directory]}} {{directory}}` +`pg_receivewal {{[-S|--slot]}} {{slot_name}} --create-slot {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}} {{[-D|--directory]}} {{directory}}` - Stop at a given WAL position (LSN): -`pg_receivewal --endpos={{lsn}} {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal {{[-E|--endpos]}} {{lsn}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}` - Control looping on failure: -`pg_receivewal --no-loop {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal {{[-n|--no-loop]}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}` - Flush data synchronously (force WAL writes immediately): -`pg_receivewal --synchronous {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal --synchronous {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}` - Compress WAL output (gzip, level 0–9): -`pg_receivewal --compress={{level}} {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal {{[-Z|--compress]}} {{level|method}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}` - Set status reporting interval: -`pg_receivewal --status-interval={{seconds}} {{[-D|--directory]}} {{directory}} -h {{host}} -p {{port}} -U {{username}}` +`pg_receivewal {{[-s|--status-interval]}} {{seconds}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}` From c6df2481cb6022f6636b2842452c56a0ebc3e102 Mon Sep 17 00:00:00 2001 From: Anirban-Chand Date: Wed, 15 Oct 2025 11:22:57 +0530 Subject: [PATCH 5/5] Update pages/common/pg_receivewal.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/common/pg_receivewal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/pg_receivewal.md b/pages/common/pg_receivewal.md index ab26fb08b7a52d..9c1e0ed68a63ad 100644 --- a/pages/common/pg_receivewal.md +++ b/pages/common/pg_receivewal.md @@ -1,6 +1,6 @@ # pg_receivewal -> Streams the write-ahead log from a running PostgreSQL cluster. +> Stream the write-ahead log from a running PostgreSQL cluster. > More information: . - Stream WAL to a local directory (minimum required):