Linux command
pg_createsubscriber 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Create subscriber from standby
pg_createsubscriber -d [dbname] -D [data_dir] -P [conninfo]
说明
pg_createsubscriber converts a physical standby to logical replication subscriber. Transforms streaming replication to logical replication. Part of PostgreSQL 17+.
参数
- -d, --database _name_
- Database name.
- -D, --pgdata _dir_
- Data directory.
- -P, --publisher-server _conninfo_
- Publisher connection string.
- -n, --dry-run
- Show what would be done.
FAQ
What is the pg_createsubscriber command used for?
pg_createsubscriber converts a physical standby to logical replication subscriber. Transforms streaming replication to logical replication. Part of PostgreSQL 17+.
How do I run a basic pg_createsubscriber example?
Run `pg_createsubscriber -d [dbname] -D [data_dir] -P [conninfo]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d, --database _name_ do in pg_createsubscriber?
Database name.