← 返回命令列表

Linux command

pg_recvlogical 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Start logical replication

pg_recvlogical -d [database] -S [slot] --start -f -

Create slot

pg_recvlogical -d [database] -S [slot] --create-slot -P [plugin]

Drop slot

pg_recvlogical -d [database] -S [slot] --drop-slot

说明

pg_recvlogical receives logical replication changes. Streams decoded changes from logical replication slot. Useful for change data capture and debugging.

参数

-d, --dbname _name_
Database name.
-S, --slot _name_
Replication slot.
--start
Start replication.
--create-slot
Create slot.
--drop-slot
Drop slot.
-P, --plugin _name_
Output plugin.
-f, --file _file_
Output file (- for stdout).

FAQ

What is the pg_recvlogical command used for?

pg_recvlogical receives logical replication changes. Streams decoded changes from logical replication slot. Useful for change data capture and debugging.

How do I run a basic pg_recvlogical example?

Run `pg_recvlogical -d [database] -S [slot] --start -f -` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -d, --dbname _name_ do in pg_recvlogical?

Database name.