mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-06 20:56:57 +00:00
Update cheatsheets
This commit is contained in:
29
tldr/pg_recvlogical
Normal file
29
tldr/pg_recvlogical
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pg_recvlogical
|
||||
|
||||
> Control PostgreSQL logical decoding streams.
|
||||
> More information: <https://www.postgresql.org/docs/current/app-pgrecvlogical.html>.
|
||||
|
||||
- Create a new logical replication slot:
|
||||
|
||||
`pg_recvlogical {{[-d|--dbname]}} {{dbname}} {{[-S|--slot]}} {{slot_name}} --create-slot`
|
||||
|
||||
- Start streaming changes from a logical replication slot to a file:
|
||||
|
||||
`pg_recvlogical {{[-d|--dbname]}} {{dbname}} {{[-S|--slot]}} {{slot_name}} --start {{[-f|--file]}} {{filename}}`
|
||||
|
||||
- Drop a logical replication slot:
|
||||
|
||||
`pg_recvlogical {{[-d|--dbname]}} {{dbname}} {{[-S|--slot]}} {{slot_name}} --drop-slot`
|
||||
|
||||
- Create a slot with two-phase commit enabled:
|
||||
|
||||
`pg_recvlogical {{[-d|--dbname]}} {{dbname}} {{[-S|--slot]}} {{slot_name}} --create-slot {{[-t|--enable-two-phase]}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pg_recvlogical {{[-?|--help]}}`
|
||||
Reference in New Issue
Block a user