Skip to content

Commit 9dd0462

Browse files
Anirban-ChandManagor
authored andcommitted
pg_receivewal: add page (tldr-pages#18735)
* pg_receivewal: add page * pg_receivewal: tldr-lint checks * pg_receivewal: Updated directory flag to {{[-D|--directory]}} * pg_receivewal: added long options for command * Update pages/common/pg_receivewal.md Co-authored-by: Managor <[email protected]> --------- Co-authored-by: Managor <[email protected]>
1 parent bddea6e commit 9dd0462

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

pages/common/pg_receivewal.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# pg_receivewal
2+
3+
> Stream the write-ahead log from a running PostgreSQL cluster.
4+
> More information: <https://www.postgresql.org/docs/current/app-pgreceivewal.html>.
5+
6+
- Stream WAL to a local directory (minimum required):
7+
8+
`pg_receivewal {{[-D|--directory]}} {{directory}}`
9+
10+
- Same as above, specify host, port, username including verbose output:
11+
12+
`pg_receivewal {{[-v|--verbose]}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}} {{[-D|--directory]}} {{directory}}`
13+
14+
- Use replication slot (create-if-needed):
15+
16+
`pg_receivewal {{[-S|--slot]}} {{slot_name}} --create-slot {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}} {{[-D|--directory]}} {{directory}}`
17+
18+
- Stop at a given WAL position (LSN):
19+
20+
`pg_receivewal {{[-E|--endpos]}} {{lsn}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}`
21+
22+
- Control looping on failure:
23+
24+
`pg_receivewal {{[-n|--no-loop]}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}`
25+
26+
- Flush data synchronously (force WAL writes immediately):
27+
28+
`pg_receivewal --synchronous {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}`
29+
30+
- Compress WAL output (gzip, level 0–9):
31+
32+
`pg_receivewal {{[-Z|--compress]}} {{level|method}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}`
33+
34+
- Set status reporting interval:
35+
36+
`pg_receivewal {{[-s|--status-interval]}} {{seconds}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}`

0 commit comments

Comments
 (0)