{"kind": "tool", "major": "18", "item": {"slug": "pg-recvlogical", "name": "pg_recvlogical", "name_zh": "", "category": "\u5ba2\u6237\u7aef\u7a0b\u5e8f", "summary": "pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41", "aliases": ["pg_recvlogical"], "content_hash": "bba702ecc59f6dc4abb4371395053634ef96ad07fafdfe869e60f9ad6910979f", "versions": {"10": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "10.23"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "22"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u7684\u5df2\u89e3\u7801\u4e8b\u52a1\u6570\u636e\u5199\u5165\u6b64\u6587\u4ef6\u3002\u4f7f\u7528 - \u8868\u793a stdout \u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u6709\u5173\u5176\u6548\u679c\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 \u7b2c 48 \u7ae0 \u548c \u7b2c 52.4 \u8282 \u4e2d\u7684\u6587\u6863\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 48 \u7ae0 \u3002\u5982\u679c\u69fd\u5df2\u5b58\u5728\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u6b64\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u8bf7\u53c2\u9605\u90a3\u91cc\u7684\u8bf4\u660e\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/10/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/10/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=10", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "label": "10.23", "major": "10", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/10/postgresql-10-A4.pdf", "bytes": 12631706, "pages": 2591, "sha256": "34497ab9efb45c5bdf1bd11b9016b5451354feb462fa029cf74557a5fa5fbbc1", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/10/postgresql-10-US.pdf", "bytes": 12531684, "pages": 2724, "sha256": "429cc7133ddf4f97c560aa466dc9caea4b718721a8321e293357037cf0af4733", "built_at": "2026-09-26"}}, "tree": "10", "index": "index.html", "major": "10", "pages": 1085, "release": "10.23", "source_url": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "svg_assets": 0, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "revision": "f9301feba91e2e2566038a36b8cee0e4402db68989538f88670fddd20b1f78ea", "evidence_kind": "English manual and source declarations", "source_sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "sources": [{"url": "https://pg.center/docs/10/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "10.23 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "961ed52996c4b9f657d2fa1894c1e74bd9500b943f6ab26d9cb08ced6e83b7fb", "language": "en", "original_url": "/docs/10/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/10/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "e4330732b6acd6c025a1fbdce45574b23d964de847a1b849ea88b98ab628d2e2", "language": "en", "original_url": "/docs/10/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.16.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/10/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/10/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u56de\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/10/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.26.6.\u00a0\u590d\u5236\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u5fc5\u987b\u81f3\u5c11\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\u6765\u9009\u62e9\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u56de\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u63a5\u6536\u5230\u7684\u5df2\u89e3\u7801\u4e8b\u52a1\u6570\u636e\u5199\u5165\u6b64\u6587\u4ef6\u3002\u4f7f\u7528<code class=\"literal\">-</code>\u8868\u793a<span class=\"systemitem\">stdout</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u6709\u5173\u5176\u6548\u679c\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605<a class=\"xref\" href=\"/docs/10/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/10/protocol-replication.html\" title=\"52.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a052.4\u00a0\u8282</a>\u4e2d\u7684\u6587\u6863\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/10/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\u3002\u5982\u679c\u69fd\u5df2\u5b58\u5728\uff0c\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/10/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u8bf7\u53c2\u9605\u90a3\u91cc\u7684\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/10/libpq.html#LIBPQ-CONNSTRING\" title=\"33.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u8be5\u5de5\u5177\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/10/libpq-envars.html\" title=\"33.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a033.14\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.8\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/10/logicaldecoding.html#LOGICALDECODING-EXAMPLE\" title=\"48.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a048.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.9\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/10/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a></span></div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/10/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "efdfcbf5d46ba652af35eb7a2eb5e1b6f77ebe77e149446503a1ec9d0568cf08", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[8]/h2[0]"]}], "language": "zh", "original_text": {"/versions/10/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/10/facts/0/label": "Documented executable", "/versions/10/facts/1/label": "Executable version", "/versions/10/facts/2/label": "Reference inventory", "/versions/10/facts/2/value": "Client applications", "/versions/10/facts/3/label": "Option definition groups", "/versions/10/tables/0/title": "Documented options", "/versions/10/related/0/label": "libpq connection parameters", "/versions/10/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/10/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/10/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/10/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/10/tables/0/rows/4/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/10/tables/0/rows/5/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/10/tables/0/rows/6/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes.", "/versions/10/tables/0/rows/7/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/10/tables/0/rows/8/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/10/tables/0/rows/9/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/10/tables/0/columns/0/label": "Option and arguments", "/versions/10/tables/0/columns/1/label": "Description", "/versions/10/tables/0/rows/10/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists.", "/versions/10/tables/0/rows/11/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/10/tables/0/rows/12/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/10/tables/0/rows/13/summary": "Enables verbose mode.", "/versions/10/tables/0/rows/14/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "/versions/10/tables/0/rows/15/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/10/tables/0/rows/16/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/10/tables/0/rows/17/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/10/tables/0/rows/18/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/10/tables/0/rows/19/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/10/tables/0/rows/20/summary": "Print the pg_recvlogical version and exit.", "/versions/10/tables/0/rows/21/summary": "Show help about pg_recvlogical command line arguments, and exit."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "406a7a17087d73f3c1baba942e6c9e69f56e5e1a5686d725410b000a5553bf93"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "7fdaefb91981303dc481e4f1250296efbce0c4c148d9f6ffdb45ed389410c379", "manual_language": "zh"}, "11": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "11.22"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "22"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 49 \u7ae0 \u548c \u7b2c 53.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 49 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/11/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/11/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=11", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "label": "11.22", "major": "11", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/11/postgresql-11-A4.pdf", "bytes": 13057499, "pages": 2732, "sha256": "41d75855e610d0d9b8802b87dc5b080bef8d7e91c7cf69401fbf8d3cf801b4b5", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/11/postgresql-11-US.pdf", "bytes": 12961189, "pages": 2883, "sha256": "6a8899ef36935a5b7ed2b436207564a567a4ef1eb1c2200195876b8de4d4fa30", "built_at": "2026-09-26"}}, "tree": "11", "index": "index.html", "major": "11", "pages": 1125, "release": "11.22", "source_url": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "svg_assets": 0, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "revision": "53315ddaf3b3f9e6669fd1edc096bbb2cd4a65ea3e836c89e542b43af9ba3a7f", "evidence_kind": "English manual and source declarations", "source_sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "sources": [{"url": "https://pg.center/docs/11/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "11.22 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "5f1be5d2376384f1085427f2a9ae87d803a3efe059ad3c2d340ff9c9d0130699", "language": "en", "original_url": "/docs/11/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/11/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "3a30e696058b118a55cc42892c39671d9bae86f77e1024d5ebcc4688ad9ab4c3", "language": "en", "original_url": "/docs/11/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.16.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/11/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/11/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u56de\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/11/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.26.6.\u00a0\u590d\u5236\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u5fc5\u987b\u81f3\u5c11\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\u6765\u9009\u62e9\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u56de\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/11/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/11/protocol-replication.html\" title=\"53.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a053.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/11/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/11/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/11/libpq.html#LIBPQ-CONNSTRING\" title=\"34.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u8be5\u5de5\u5177\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/11/libpq-envars.html\" title=\"34.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a034.14\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u63a5\u6536\u5230\u7684 WAL \u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.9\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/11/logicaldecoding.html#LOGICALDECODING-EXAMPLE\" title=\"49.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a049.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/11/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/11/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "5fa7ad8cf2bbf7eba572f29f046d3629979fe91c8a99232005c2687295ee4fa3", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]"]}], "language": "zh", "original_text": {"/versions/11/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/11/facts/0/label": "Documented executable", "/versions/11/facts/1/label": "Executable version", "/versions/11/facts/2/label": "Reference inventory", "/versions/11/facts/2/value": "Client applications", "/versions/11/facts/3/label": "Option definition groups", "/versions/11/tables/0/title": "Documented options", "/versions/11/related/0/label": "libpq connection parameters", "/versions/11/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/11/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/11/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/11/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/11/tables/0/rows/4/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/11/tables/0/rows/5/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/11/tables/0/rows/6/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes.", "/versions/11/tables/0/rows/7/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/11/tables/0/rows/8/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/11/tables/0/rows/9/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/11/tables/0/columns/0/label": "Option and arguments", "/versions/11/tables/0/columns/1/label": "Description", "/versions/11/tables/0/rows/10/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.", "/versions/11/tables/0/rows/11/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/11/tables/0/rows/12/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/11/tables/0/rows/13/summary": "Enables verbose mode.", "/versions/11/tables/0/rows/14/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "/versions/11/tables/0/rows/15/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/11/tables/0/rows/16/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/11/tables/0/rows/17/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/11/tables/0/rows/18/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/11/tables/0/rows/19/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/11/tables/0/rows/20/summary": "Print the pg_recvlogical version and exit.", "/versions/11/tables/0/rows/21/summary": "Show help about pg_recvlogical command line arguments, and exit."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "59644afa3ffcd5e2cee2a08311afea68a11185522ac8ec72d857cb6ee7e7e55c"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "cb23380d69569dabfc3a12174e3c5d84e7b01ec354458f8a37ed72d89bf52baf", "manual_language": "zh"}, "12": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "12.22"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "22"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 48 \u7ae0 \u548c \u7b2c 52.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 48 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/12/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/12/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=12", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "12.22", "major": "12", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/12/postgresql-12-A4.pdf", "bytes": 13424351, "pages": 2803, "sha256": "7422cf53fd1939e7a3d2925231a88b0330e468afa5393627cac0ff86158a0621", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/12/postgresql-12-US.pdf", "bytes": 13322565, "pages": 2958, "sha256": "51f3b04e72907fc38512685946223452ea65f84419c60c66241dfa3396035e77", "built_at": "2026-09-26"}}, "tree": "12", "index": "index.html", "major": "12", "pages": 1131, "release": "12.22", "source_url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "svg_assets": 2, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "revision": "7a827e97cbfacd7febff75f34443e2043e40723de5b6d8c9d81a9430b65a37e4", "evidence_kind": "English manual and source declarations", "source_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "sources": [{"url": "https://pg.center/docs/12/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "12.22 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "e281a1ec15b0f8edb3a166f1b95dda8f8202bae1c2ecb92cbe99efa30359631d", "language": "en", "original_url": "/docs/12/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/12/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "089624dd131f52eea682b304f87a1acb03392ee7bcf78b000699c9b17c7ca22d", "language": "en", "original_url": "/docs/12/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.16.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/12/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/12/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u56de\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/12/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.26.6.\u00a0\u590d\u5236\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u5fc5\u987b\u81f3\u5c11\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\u6765\u9009\u62e9\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u56de\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/12/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/12/protocol-replication.html\" title=\"52.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a052.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/12/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/12/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/12/libpq.html#LIBPQ-CONNSTRING\" title=\"33.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u8be5\u5de5\u5177\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/12/libpq-envars.html\" title=\"33.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a033.14\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u63a5\u6536\u5230\u7684 WAL \u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.9\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/12/logicaldecoding.html#LOGICALDECODING-EXAMPLE\" title=\"48.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a048.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/12/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/12/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "77640d0d9b3076108fdfb45ada97a3eecb6e09fe61944e6efcf7422e46306208", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[6]/p[2]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]"]}], "language": "zh", "original_text": {"/versions/12/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/12/facts/0/label": "Documented executable", "/versions/12/facts/1/label": "Executable version", "/versions/12/facts/2/label": "Reference inventory", "/versions/12/facts/2/value": "Client applications", "/versions/12/facts/3/label": "Option definition groups", "/versions/12/tables/0/title": "Documented options", "/versions/12/related/0/label": "libpq connection parameters", "/versions/12/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/12/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/12/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/12/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/12/tables/0/rows/4/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/12/tables/0/rows/5/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/12/tables/0/rows/6/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes.", "/versions/12/tables/0/rows/7/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/12/tables/0/rows/8/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/12/tables/0/rows/9/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/12/tables/0/columns/0/label": "Option and arguments", "/versions/12/tables/0/columns/1/label": "Description", "/versions/12/tables/0/rows/10/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists.", "/versions/12/tables/0/rows/11/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/12/tables/0/rows/12/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/12/tables/0/rows/13/summary": "Enables verbose mode.", "/versions/12/tables/0/rows/14/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "/versions/12/tables/0/rows/15/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/12/tables/0/rows/16/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/12/tables/0/rows/17/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/12/tables/0/rows/18/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/12/tables/0/rows/19/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/12/tables/0/rows/20/summary": "Print the pg_recvlogical version and exit.", "/versions/12/tables/0/rows/21/summary": "Show help about pg_recvlogical command line arguments, and exit."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "5d9b6af1d915404b111794e0c11547cc242164cb5d7cb1bf96c9ee4d4045e114"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "7fdaefb91981303dc481e4f1250296efbce0c4c148d9f6ffdb45ed389410c379", "manual_language": "zh"}, "13": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "13.23"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "22"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 48 \u7ae0 \u548c \u7b2c 52.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 48 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/13/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/13/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=13", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "13.23", "major": "13", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/13/postgresql-13-A4.pdf", "bytes": 13843239, "pages": 2826, "sha256": "171cc09f90936dbc1cbd503a98ff07ae72ea58ab9771ff051313f1217737799c", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/13/postgresql-13-US.pdf", "bytes": 13739572, "pages": 2984, "sha256": "48d09c6e197d9db4220f41afe83efe848a8661b1b168d3b89419751ecaf6c24d", "built_at": "2026-09-26"}}, "tree": "13", "index": "index.html", "major": "13", "pages": 1139, "release": "13.23", "source_url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "revision": "614ee3133270254e476c118cdf6f72af78d4e4b8bbd9b28ed9ab1e14e4e9c0f6", "evidence_kind": "English manual and source declarations", "source_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "sources": [{"url": "https://pg.center/docs/13/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "13.23 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "2c399c47cbdea224d29e03c3066ee0cfd762927eca3b0d7eeb97edd08ba9a0b0", "language": "en", "original_url": "/docs/13/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/13/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "2a16c2982d9803edd4bd6920f76b66083e7f2959182d6a3bcec7ccfbac0a9ad8", "language": "en", "original_url": "/docs/13/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.16.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/13/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/13/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u56de\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/13/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.27.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u5fc5\u987b\u81f3\u5c11\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\u6765\u9009\u62e9\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u56de\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/13/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/13/protocol-replication.html\" title=\"52.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a052.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/13/logicaldecoding.html\" title=\"\u7b2c\u00a048\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a048\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/13/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/13/libpq.html#LIBPQ-CONNSTRING\" title=\"33.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u8be5\u5de5\u5177\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/13/libpq-envars.html\" title=\"33.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a033.14\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u63a5\u6536\u5230\u7684 WAL \u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.9\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/13/logicaldecoding.html#LOGICALDECODING-EXAMPLE\" title=\"48.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a048.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.16.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/13/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\">pg_receivewal</span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/13/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "49498a59ede91ead28a505352a56e7d024a600967ed355d8f3aed343780c2e98", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[6]/p[2]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]"]}], "language": "zh", "original_text": {"/versions/13/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/13/facts/0/label": "Documented executable", "/versions/13/facts/1/label": "Executable version", "/versions/13/facts/2/label": "Reference inventory", "/versions/13/facts/2/value": "Client applications", "/versions/13/facts/3/label": "Option definition groups", "/versions/13/tables/0/title": "Documented options", "/versions/13/related/0/label": "libpq connection parameters", "/versions/13/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/13/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/13/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/13/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/13/tables/0/rows/4/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/13/tables/0/rows/5/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/13/tables/0/rows/6/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes.", "/versions/13/tables/0/rows/7/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/13/tables/0/rows/8/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/13/tables/0/rows/9/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/13/tables/0/columns/0/label": "Option and arguments", "/versions/13/tables/0/columns/1/label": "Description", "/versions/13/tables/0/rows/10/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists.", "/versions/13/tables/0/rows/11/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/13/tables/0/rows/12/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/13/tables/0/rows/13/summary": "Enables verbose mode.", "/versions/13/tables/0/rows/14/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "/versions/13/tables/0/rows/15/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/13/tables/0/rows/16/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/13/tables/0/rows/17/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/13/tables/0/rows/18/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/13/tables/0/rows/19/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/13/tables/0/rows/20/summary": "Print the pg_recvlogical version and exit.", "/versions/13/tables/0/rows/21/summary": "Show help about pg_recvlogical command line arguments, and exit."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "8f8c39ffa54020a38ba8fda27d8abcbf591bc3f04db5bae14898559bb48d5937"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "7fdaefb91981303dc481e4f1250296efbce0c4c148d9f6ffdb45ed389410c379", "manual_language": "zh"}, "14": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "14.24"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "22"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 49 \u7ae0 \u548c \u7b2c 53.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 49 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/14/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/14/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=14", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/14/postgresql-14-A4.pdf", "bytes": 14354704, "pages": 2944, "sha256": "8bc6b9dd7b246888bb77f0a5e8c39a2eae52e9926569832669c7d1600becb27c", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/14/postgresql-14-US.pdf", "bytes": 14242178, "pages": 3102, "sha256": "b7ecb5a5f62d8b9f73a69e25a7d26ba285373bc53168a553bff7b77955506db4", "built_at": "2026-09-26"}}, "tree": "14", "index": "index.html", "major": "14", "pages": 1158, "release": "14.24", "source_url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "revision": "588700d46356d8837c77c7c0a4e71e645fe6535983b8f1830aa8f2e4e41c40ae", "evidence_kind": "English manual and source declarations", "source_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sources": [{"url": "https://pg.center/docs/14/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "14.24 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "000e02796e1792d406764eb36538409d4a74c397e4f047ca43f744c0949865bd", "language": "en", "original_url": "/docs/14/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/14/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "5a13567a052954dfe494dfaab9f50919faa1ae56023930fdbb78d45e53feccde", "language": "en", "original_url": "/docs/14/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.17.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/14/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/14/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u91cd\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/14/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.27.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u81f3\u5c11\u5fc5\u987b\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\uff0c\u4ee5\u9009\u62e9\u8981\u6267\u884c\u7684\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u91cd\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/14/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/14/protocol-replication.html\" title=\"53.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a053.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/14/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/14/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0b\u5217\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/14/libpq.html#LIBPQ-CONNSTRING\" title=\"34.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/14/libpq-envars.html\" title=\"34.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a034.15\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u8f93\u51fa\u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.9\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/14/logicaldecoding.html#LOGICALDECODING-EXAMPLE\" title=\"49.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a049.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/14/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/14/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "ba55702ad90a2a1dd9d65362a00dafc6d955ac15fcff20b7e5239aec13f961e2", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[6]/p[2]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]"]}], "language": "zh", "original_text": {"/versions/14/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/14/facts/0/label": "Documented executable", "/versions/14/facts/1/label": "Executable version", "/versions/14/facts/2/label": "Reference inventory", "/versions/14/facts/2/value": "Client applications", "/versions/14/facts/3/label": "Option definition groups", "/versions/14/tables/0/title": "Documented options", "/versions/14/related/0/label": "libpq connection parameters", "/versions/14/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/14/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/14/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/14/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/14/tables/0/rows/4/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/14/tables/0/rows/5/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/14/tables/0/rows/6/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes.", "/versions/14/tables/0/rows/7/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/14/tables/0/rows/8/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/14/tables/0/rows/9/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/14/tables/0/columns/0/label": "Option and arguments", "/versions/14/tables/0/columns/1/label": "Description", "/versions/14/tables/0/rows/10/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.", "/versions/14/tables/0/rows/11/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/14/tables/0/rows/12/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/14/tables/0/rows/13/summary": "Enables verbose mode.", "/versions/14/tables/0/rows/14/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "/versions/14/tables/0/rows/15/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/14/tables/0/rows/16/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/14/tables/0/rows/17/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/14/tables/0/rows/18/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/14/tables/0/rows/19/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/14/tables/0/rows/20/summary": "Print the pg_recvlogical version and exit.", "/versions/14/tables/0/rows/21/summary": "Show help about pg_recvlogical command line arguments, and exit."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "b60d82fd4f3de02b08b06e71f7c12b835df21fc1fd35959f23f40f024d93f065"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "cb23380d69569dabfc3a12174e3c5d84e7b01ec354458f8a37ed72d89bf52baf", "manual_language": "zh"}, "15": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "15.19"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "23"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 49 \u7ae0 \u548c \u7b2c 55.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 49 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-t --two-phase"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/15/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --two-phase can be specified with --create-slot to enable decoding of prepared transactions."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 55.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 55.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-t", "--two-phase"], "summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot", "signature": "-t --two-phase", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot"}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/15/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=15", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/15/postgresql-15-A4.pdf", "bytes": 14609140, "pages": 2987, "sha256": "66228564a4d16efb47d6a914085716ecfe22ca1566db56bc7c3d82f790646d72", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/15/postgresql-15-US.pdf", "bytes": 14495690, "pages": 3153, "sha256": "645a498c2390d47a6223ec74770631185807a19c484edb0fc5a295d9f460bc02", "built_at": "2026-09-26"}}, "tree": "15", "index": "index.html", "major": "15", "pages": 1168, "release": "15.19", "source_url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "revision": "6af958c6520151fc7697d56e0616b03fb00522c4568158674d452ae0644ba545", "evidence_kind": "English manual and source declarations", "source_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sources": [{"url": "https://pg.center/docs/15/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "15.19 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "f213fbb8407a33f124af89e874da58a165637ae96ea68c6910ce5911cee05d96", "language": "en", "original_url": "/docs/15/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/15/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "015b2ea2bd205946a55a1b837e735570631bac831c92074a6bf58444f9a3cb98", "language": "en", "original_url": "/docs/15/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.17.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/15/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/15/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u91cd\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/15/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.27.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u81f3\u5c11\u5fc5\u987b\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\uff0c\u4ee5\u9009\u62e9\u8981\u6267\u884c\u7684\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u5c06 --two-phase \u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\uff0c\u4ee5\u542f\u7528\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u91cd\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/15/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/15/protocol-replication.html\" title=\"55.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a055.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/15/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/15/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--two-phase</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e<code class=\"option\">--create-slot</code>\u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0b\u5217\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/15/libpq.html#LIBPQ-CONNSTRING\" title=\"34.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/15/libpq-envars.html\" title=\"34.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a034.15\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u8f93\u51fa\u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.9\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/15/logicaldecoding.html#LOGICALDECODING-EXAMPLE\" title=\"49.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a049.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/15/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/15/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "3fccac081eee05d3d6bee47adaae1c0a4c92b5b09648ae6ff0c705dcb5fd9078", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[23]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[6]/p[2]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]"]}], "language": "zh", "original_text": {"/versions/15/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/15/facts/0/label": "Documented executable", "/versions/15/facts/1/label": "Executable version", "/versions/15/facts/2/label": "Reference inventory", "/versions/15/facts/2/value": "Client applications", "/versions/15/facts/3/label": "Option definition groups", "/versions/15/tables/0/title": "Documented options", "/versions/15/related/0/label": "libpq connection parameters", "/versions/15/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/15/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/15/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/15/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/15/tables/0/rows/4/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/15/tables/0/rows/5/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/15/tables/0/rows/6/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 55.4 . Ignored in other modes.", "/versions/15/tables/0/rows/7/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/15/tables/0/rows/8/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/15/tables/0/rows/9/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/15/tables/0/columns/0/label": "Option and arguments", "/versions/15/tables/0/columns/1/label": "Description", "/versions/15/tables/0/rows/10/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.", "/versions/15/tables/0/rows/11/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/15/tables/0/rows/12/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/15/tables/0/rows/13/summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot", "/versions/15/tables/0/rows/14/summary": "Enables verbose mode.", "/versions/15/tables/0/rows/15/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "/versions/15/tables/0/rows/16/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/15/tables/0/rows/17/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/15/tables/0/rows/18/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/15/tables/0/rows/19/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/15/tables/0/rows/20/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/15/tables/0/rows/21/summary": "Print the pg_recvlogical version and exit.", "/versions/15/tables/0/rows/22/summary": "Show help about pg_recvlogical command line arguments, and exit."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "c441c0a11f4f57867752757d7e6f01c53b84c0530ff141144c38b6c59290ece6"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --two-phase can be specified with --create-slot to enable decoding of prepared transactions."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 55.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-t", "--two-phase"], "signature": "-t --two-phase", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot"}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "a1e55e317386f04dfd6208582358f533a1d4d6134c70f94a17b0552b7e30127a", "manual_language": "zh"}, "16": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "16.15"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "23"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 49 \u7ae0 \u548c \u7b2c 55.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 49 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-t --two-phase"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/16/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --two-phase can be specified with --create-slot to enable decoding of prepared transactions."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 55.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 55.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-t", "--two-phase"], "summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot", "signature": "-t --two-phase", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot"}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/16/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=16", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/16/postgresql-16-A4.pdf", "bytes": 15282337, "pages": 3055, "sha256": "4bb6c1f63deedac98736d8c4c7bc0fad0ac24e85b07e21ee10411872f06afd06", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/16/postgresql-16-US.pdf", "bytes": 15164148, "pages": 3220, "sha256": "5b6b6166c89991199e144bb0ae34c17a5f29826251dbf19db1abc0df3a3e771b", "built_at": "2026-09-26"}}, "tree": "16", "index": "index.html", "major": "16", "pages": 1169, "release": "16.15", "source_url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "revision": "3c21e58b35318021716440e67bb8bafd392b6a2b965a244d90e9e33c99e0bdef", "evidence_kind": "English manual and source declarations", "source_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sources": [{"url": "https://pg.center/docs/16/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "16.15 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "8fe72a6e0a00b5c893d2dadedc84a27c5d5830f2f292dac509ecd77bd86bf9c9", "language": "en", "original_url": "/docs/16/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/16/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "a28c30c3c0f8783e16d56413a0b6fd39487e336da1683b29b60abf1c229cef26", "language": "en", "original_url": "/docs/16/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.17.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/16/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/16/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u91cd\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/16/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.27.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5728\u6ca1\u6709\u81f4\u547d\u9519\u8bef\u7684\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4e00\u76f4\u8fd0\u884c\uff0c\u76f4\u5230\u6536\u5230 <span class=\"systemitem\">SIGINT</span>\uff08<span class=\"keycap\"><strong>Control</strong></span>+<span class=\"keycap\"><strong>C</strong></span>\uff09\u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u81f3\u5c11\u5fc5\u987b\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\uff0c\u4ee5\u9009\u62e9\u8981\u6267\u884c\u7684\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u5c06 --two-phase \u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\uff0c\u4ee5\u542f\u7528\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u91cd\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/16/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/16/protocol-replication.html\" title=\"55.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a055.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/16/logicaldecoding.html\" title=\"\u7b2c\u00a049\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a049\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/16/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--two-phase</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e<code class=\"option\">--create-slot</code>\u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0b\u5217\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/16/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"34.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.7\">\n<h2 lang=\"zh\">\u9000\u51fa\u72b6\u6001</h2>\n<p lang=\"zh\">\u5f53\u6536\u5230 <span class=\"systemitem\">SIGINT</span> \u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u7ec8\u6b62\u65f6\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4ee5\u72b6\u6001 0 \u9000\u51fa\u3002\uff08\u8fd9\u662f\u5176\u6b63\u5e38\u7ed3\u675f\u65b9\u5f0f\uff0c\u56e0\u6b64\u4e0d\u89c6\u4e3a\u9519\u8bef\u3002\uff09\u9047\u5230\u81f4\u547d\u9519\u8bef\u6216\u5176\u4ed6\u4fe1\u53f7\u65f6\uff0c\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.8\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/16/libpq-envars.html\" title=\"34.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a034.15\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.9\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u8f93\u51fa\u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.10\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/16/logicaldecoding-example.html\" title=\"49.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a049.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.17.11\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/16/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/16/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "502296dd610e535194b56fa0b076849b3254836c99716f88bd2ede75cc766e43", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[10]/h2[0]", "#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[4]/p[5]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[23]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[7]/p[2]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]", "#APP-PGRECVLOGICAL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/16/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/16/facts/0/label": "Documented executable", "/versions/16/facts/1/label": "Executable version", "/versions/16/facts/2/label": "Reference inventory", "/versions/16/facts/2/value": "Client applications", "/versions/16/facts/3/label": "Option definition groups", "/versions/16/tables/0/title": "Documented options", "/versions/16/related/0/label": "libpq connection parameters", "/versions/16/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/16/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/16/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/16/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/16/tables/0/rows/4/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/16/tables/0/rows/5/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/16/tables/0/rows/6/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 55.4 . Ignored in other modes.", "/versions/16/tables/0/rows/7/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/16/tables/0/rows/8/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/16/tables/0/rows/9/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/16/tables/0/columns/0/label": "Option and arguments", "/versions/16/tables/0/columns/1/label": "Description", "/versions/16/tables/0/rows/10/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.", "/versions/16/tables/0/rows/11/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/16/tables/0/rows/12/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/16/tables/0/rows/13/summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot", "/versions/16/tables/0/rows/14/summary": "Enables verbose mode.", "/versions/16/tables/0/rows/15/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "/versions/16/tables/0/rows/16/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/16/tables/0/rows/17/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/16/tables/0/rows/18/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/16/tables/0/rows/19/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/16/tables/0/rows/20/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/16/tables/0/rows/21/summary": "Print the pg_recvlogical version and exit.", "/versions/16/tables/0/rows/22/summary": "Show help about pg_recvlogical command line arguments, and exit."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "2b19d42acdb3ec047cdf05c0c6b7c00262bc6dc0c1e19c7707e0f845d1a660b4"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --two-phase can be specified with --create-slot to enable decoding of prepared transactions."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 55.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-t", "--two-phase"], "signature": "-t --two-phase", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot"}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "a1e55e317386f04dfd6208582358f533a1d4d6134c70f94a17b0552b7e30127a", "manual_language": "zh"}, "17": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "17.11"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "23"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 47 \u7ae0 \u548c \u7b2c 53.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 47 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-t --two-phase"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/17/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --two-phase can be specified with --create-slot to enable decoding of prepared transactions."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 53.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 53.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-t", "--two-phase"], "summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "signature": "-t --two-phase", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/17/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=17", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/17/postgresql-17-A4.pdf", "bytes": 15521293, "pages": 3099, "sha256": "1991354df0dc89e70ec39328c28988ef8b19c6a93671dab3893650b63e9f4e36", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/17/postgresql-17-US.pdf", "bytes": 15398150, "pages": 3270, "sha256": "07696c8f38abf31babf22d2db337093936e7c472d2af36d050b000c49bbcf52c", "built_at": "2026-09-26"}}, "tree": "17", "index": "index.html", "major": "17", "pages": 1143, "release": "17.11", "source_url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "revision": "58419c9b0dd42cb34c8d53695bb025a7e582edf55ccd4c5bcb1c2c7c71a37487", "evidence_kind": "English manual and source declarations", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "https://pg.center/docs/17/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "17.11 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "f0e116635d9e0f3f98d7e32d9e87215c597ff933bae24ff3576f55f961a44ebf", "language": "en", "original_url": "/docs/17/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/17/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "3194fc72ddad8e2fcba55f8e007f83413cb352146cb65aaa9457a18d0314ee1b", "language": "en", "original_url": "/docs/17/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.18.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/17/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/17/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u91cd\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/17/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.28.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5728\u6ca1\u6709\u81f4\u547d\u9519\u8bef\u7684\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4e00\u76f4\u8fd0\u884c\uff0c\u76f4\u5230\u6536\u5230 <span class=\"systemitem\">SIGINT</span>\uff08<span class=\"keycap\"><strong>Control</strong></span>+<span class=\"keycap\"><strong>C</strong></span>\uff09\u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u81f3\u5c11\u5fc5\u987b\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\uff0c\u4ee5\u9009\u62e9\u8981\u6267\u884c\u7684\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u5c06 --two-phase \u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\uff0c\u4ee5\u542f\u7528\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u91cd\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/17/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/17/protocol-replication.html\" title=\"53.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a053.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/17/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/17/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--two-phase</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e<code class=\"option\">--create-slot</code>\u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0b\u5217\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u3002\u6709\u5173\u5176\u5177\u4f53\u542b\u4e49\uff0c\u8bf7\u53c2\u9605\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/17/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u5982\u6b64\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u4f1a\u8986\u76d6\u4efb\u4f55\u4e0e\u4e4b\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.7\">\n<h2 lang=\"zh\">\u9000\u51fa\u72b6\u6001</h2>\n<p lang=\"zh\">\u5f53\u6536\u5230 <span class=\"systemitem\">SIGINT</span> \u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u7ec8\u6b62\u65f6\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4ee5\u72b6\u6001 0 \u9000\u51fa\u3002\uff08\u8fd9\u662f\u5176\u6b63\u5e38\u7ed3\u675f\u65b9\u5f0f\uff0c\u56e0\u6b64\u4e0d\u89c6\u4e3a\u9519\u8bef\u3002\uff09\u9047\u5230\u81f4\u547d\u9519\u8bef\u6216\u5176\u4ed6\u4fe1\u53f7\u65f6\uff0c\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.8\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/17/libpq-envars.html\" title=\"32.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.15\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.9\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u8f93\u51fa\u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.10\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/17/logicaldecoding-example.html\" title=\"47.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a047.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.11\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/17/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/17/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "236bedfa46d454d0dcb723f64964fe61a4d5bd259598f56f2aef6a9d6259d5b4", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[10]/h2[0]", "#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[4]/p[5]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[23]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[7]/p[2]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]", "#APP-PGRECVLOGICAL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/17/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/17/facts/0/label": "Documented executable", "/versions/17/facts/1/label": "Executable version", "/versions/17/facts/2/label": "Reference inventory", "/versions/17/facts/2/value": "Client applications", "/versions/17/facts/3/label": "Option definition groups", "/versions/17/tables/0/title": "Documented options", "/versions/17/related/0/label": "libpq connection parameters", "/versions/17/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/17/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/17/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/17/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/17/tables/0/rows/4/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/17/tables/0/rows/5/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/17/tables/0/rows/6/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 53.4 . Ignored in other modes.", "/versions/17/tables/0/rows/7/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/17/tables/0/rows/8/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/17/tables/0/rows/9/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/17/tables/0/columns/0/label": "Option and arguments", "/versions/17/tables/0/columns/1/label": "Description", "/versions/17/tables/0/rows/10/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists.", "/versions/17/tables/0/rows/11/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/17/tables/0/rows/12/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/17/tables/0/rows/13/summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "/versions/17/tables/0/rows/14/summary": "Enables verbose mode.", "/versions/17/tables/0/rows/15/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name.", "/versions/17/tables/0/rows/16/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/17/tables/0/rows/17/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/17/tables/0/rows/18/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/17/tables/0/rows/19/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/17/tables/0/rows/20/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/17/tables/0/rows/21/summary": "Print the pg_recvlogical version and exit.", "/versions/17/tables/0/rows/22/summary": "Show help about pg_recvlogical command line arguments, and exit."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "70ea521bcf35b50fe3a9d160a9f325e5dbf6643faee46e5d58f65c0b755d5dda"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --two-phase can be specified with --create-slot to enable decoding of prepared transactions."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 53.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name."}, {"names": ["-t", "--two-phase"], "signature": "-t --two-phase", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. Defaults to the user name."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "ca38abf8313905817d5430eb84478265d44900451c3dfd110858b605b0811608", "manual_language": "zh"}, "18": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "18.6"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "24"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5141\u8bb8\u5c06\u8be5\u69fd\u540c\u6b65\u5230\u5907\u5e93\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--enable-failover"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 47 \u7ae0 \u548c \u7b2c 54.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 47 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-t --enable-two-phase --two-phase \uff08\u5df2\u5e9f\u5f03\uff09"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u5230\u7684\u6570\u636e\u5e93\u3002\u5176\u5177\u4f53\u542b\u4e49\u8bf7\u53c2\u89c1\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --slot and --dbname are required for this action. The --enable-two-phase and --enable-failover options can be specified with --create-slot ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit. The --slot is required for this action."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The --slot and --dbname , --file are required for this action. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["--enable-failover"], "summary": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot .", "signature": "--enable-failover", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot ."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout . This parameter is required for --start ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name. This parameter is required for any of actions."}, {"names": ["-t", "--enable-two-phase", "--two-phase"], "summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "signature": "-t --enable-two-phase --two-phase (deprecated)", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. This parameter is required for --create-slot and --start ."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=18", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/18/postgresql-18-A4.pdf", "bytes": 15865106, "pages": 3154, "sha256": "19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/18/postgresql-18-US.pdf", "bytes": 15748059, "pages": 3328, "sha256": "facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319", "built_at": "2026-09-26"}}, "tree": "18", "index": "index.html", "major": "18", "pages": 1148, "release": "18.6", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "revision": "ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8", "evidence_kind": "English manual and source declarations", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "18.6 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "3052f6f3caa9b5cca077878cde0cd9f927a9489aaf13cc41209fa504c1327f39", "language": "en", "original_url": "/docs/18/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/18/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "68f726af77272fe73a827be2b7b5958d0f2239a6f8ed44264e9d42496bfa4fd0", "language": "en", "original_url": "/docs/18/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.18.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/18/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/18/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u91cd\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/18/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.28.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5728\u6ca1\u6709\u81f4\u547d\u9519\u8bef\u7684\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4e00\u76f4\u8fd0\u884c\uff0c\u76f4\u5230\u6536\u5230 <span class=\"systemitem\">SIGINT</span>\uff08<span class=\"keycap\"><strong>Control</strong></span>+<span class=\"keycap\"><strong>C</strong></span>\uff09\u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u81f3\u5c11\u5fc5\u987b\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\uff0c\u4ee5\u9009\u62e9\u8981\u6267\u884c\u7684\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code> \u548c <code class=\"option\">--dbname</code>\u3002</p>\n<p lang=\"zh\">--enable-two-phase \u548c --enable-failover \u9009\u9879\u53ef\u4ee5\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code>\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code>\u3001<code class=\"option\">--dbname</code> \u548c <code class=\"option\">--file</code>\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u91cd\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--enable-failover</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5141\u8bb8\u5c06\u8be5\u69fd\u540c\u6b65\u5230\u5907\u5e93\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e <code class=\"option\">--create-slot</code> \u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5bf9\u4e8e <code class=\"option\">--start</code> \u64cd\u4f5c\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/18/protocol-replication.html\" title=\"54.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a054.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/18/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5bf9\u4e8e\u4efb\u4f55\u4e00\u79cd\u64cd\u4f5c\u90fd\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt lang=\"zh\"><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--enable-two-phase</code><br/></span><span class=\"term\"><code class=\"option\">--two-phase</code>\uff08\u5df2\u5e9f\u5f03\uff09</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e<code class=\"option\">--create-slot</code>\u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0b\u5217\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8981\u8fde\u63a5\u5230\u7684\u6570\u636e\u5e93\u3002\u5176\u5177\u4f53\u542b\u4e49\u8bf7\u53c2\u89c1\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/18/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5728 <code class=\"option\">--create-slot</code> \u548c <code class=\"option\">--start</code> \u64cd\u4f5c\u4e2d\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.7\">\n<h2 lang=\"zh\">\u9000\u51fa\u72b6\u6001</h2>\n<p lang=\"zh\">\u5f53\u6536\u5230 <span class=\"systemitem\">SIGINT</span> \u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u7ec8\u6b62\u65f6\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4ee5\u72b6\u6001 0 \u9000\u51fa\u3002\uff08\u8fd9\u662f\u5176\u6b63\u5e38\u7ed3\u675f\u65b9\u5f0f\uff0c\u56e0\u6b64\u4e0d\u89c6\u4e3a\u9519\u8bef\u3002\uff09\u9047\u5230\u81f4\u547d\u9519\u8bef\u6216\u5176\u4ed6\u4fe1\u53f7\u65f6\uff0c\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.8\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/18/libpq-envars.html\" title=\"32.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.15\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.9\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u8f93\u51fa\u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.10\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/logicaldecoding-example.html\" title=\"47.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a047.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.11\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/18/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "2850074000a597324b32b05230f97ea08a066b95d7947ce2ae0299c15e3a3ef9", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[10]/h2[0]", "#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[4]/p[5]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[23]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[25]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dt[22]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[7]/p[2]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]", "#APP-PGRECVLOGICAL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/18/facts/0/label": "Documented executable", "/versions/18/facts/1/label": "Executable version", "/versions/18/facts/2/label": "Reference inventory", "/versions/18/facts/2/value": "Client applications", "/versions/18/facts/3/label": "Option definition groups", "/versions/18/tables/0/title": "Documented options", "/versions/18/related/0/label": "libpq connection parameters", "/versions/18/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/18/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/18/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/18/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/18/tables/0/rows/4/summary": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot .", "/versions/18/tables/0/rows/5/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/18/tables/0/rows/6/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/18/tables/0/rows/7/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes.", "/versions/18/tables/0/rows/8/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/18/tables/0/rows/9/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/18/tables/0/columns/0/label": "Option and arguments", "/versions/18/tables/0/columns/1/label": "Description", "/versions/18/tables/0/rows/10/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/18/tables/0/rows/11/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists.", "/versions/18/tables/0/rows/12/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/18/tables/0/rows/13/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/18/tables/0/rows/14/summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "/versions/18/tables/0/rows/15/summary": "Enables verbose mode.", "/versions/18/tables/0/rows/16/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options.", "/versions/18/tables/0/rows/17/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/18/tables/0/rows/18/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/18/tables/0/rows/19/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/18/tables/0/rows/20/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/18/tables/0/rows/21/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/18/tables/0/rows/22/summary": "Print the pg_recvlogical version and exit.", "/versions/18/tables/0/rows/23/summary": "Show help about pg_recvlogical command line arguments, and exit.", "/versions/18/tables/0/rows/14/signature/text": "-t --enable-two-phase --two-phase (deprecated)"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "765fe84c6f6c277d85ddf34edb0346bd4ac8f9941ce70c7111717e30d4aa0fd2"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --slot and --dbname are required for this action. The --enable-two-phase and --enable-failover options can be specified with --create-slot ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit. The --slot is required for this action."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The --slot and --dbname , --file are required for this action. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["--enable-failover"], "signature": "--enable-failover", "description": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot ."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout . This parameter is required for --start ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name. This parameter is required for any of actions."}, {"names": ["-t", "--enable-two-phase", "--two-phase"], "signature": "-t --enable-two-phase --two-phase (deprecated)", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. This parameter is required for --create-slot and --start ."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "7e4d124b6d72f9dbcf5a935f6ef5cfdac9d56466c979b9dabadfcd070a54dfeb", "manual_language": "zh"}, "19": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "19beta4"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "24"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5141\u8bb8\u5c06\u8be5\u69fd\u540c\u6b65\u5230\u5907\u5e93\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "--enable-failover"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002\u9ed8\u8ba4\u503c\u4e3a 10 \u79d2\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 47 \u7ae0 \u548c \u7b2c 54.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 47.6 \u8282 \uff0c\u4e86\u89e3 PostgreSQL \u63d0\u4f9b\u7684\u63d2\u4ef6\u4fe1\u606f\u3002\u9ed8\u8ba4\u503c\u662f test_decoding \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-t --enable-two-phase --two-phase \uff08\u5df2\u5e9f\u5f03\uff09"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u5230\u7684\u6570\u636e\u5e93\u3002\u5176\u5177\u4f53\u542b\u4e49\u8bf7\u53c2\u89c1\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/19/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --slot and --dbname options are required for this action. The --enable-two-phase and --enable-failover options can be specified with --create-slot ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit. The --slot option is required for this action."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The --slot , --dbname , and --file options are required for this action. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["--enable-failover"], "summary": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot .", "signature": "--enable-failover", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot ."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout . This parameter is required for --start ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The default value is 10 seconds.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The default value is 10 seconds. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Section 47.6 for information about the plugins PostgreSQL provides. The default is test_decoding . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Section 47.6 for information about the plugins PostgreSQL provides. The default is test_decoding . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name. This parameter is required for any of actions."}, {"names": ["-t", "--enable-two-phase", "--two-phase"], "summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "signature": "-t --enable-two-phase --two-phase (deprecated)", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. This parameter is required for --create-slot and --start ."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/19/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=19", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/19/postgresql-19-A4.pdf", "bytes": 16064841, "pages": 3052, "sha256": "4dd099e4125c591128fc5f3ebd02178dc24781f9e5ae629f96d67c4c8547427b", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/19/postgresql-19-US.pdf", "bytes": 15974616, "pages": 3225, "sha256": "61971fa857f0956d47341a0388fa6af9ae10acf691d4b2fc009007d384b0342b", "built_at": "2026-09-26"}}, "tree": "19", "index": "index.html", "major": "19", "pages": 1155, "release": "19beta4", "source_url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "svg_assets": 5, "source_mode": "en SGML built with pinned official archive", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "revision": "1bbbbf4133d426f0e4304010688d2984c30fb67df0cc3a61b3e37eb3f6f37833", "evidence_kind": "English manual and source declarations", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "https://pg.center/docs/19/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "19beta4 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "e4a79f38bcd57bb1d703968ab9b324e579bff6fe1ae84051f679c6a9f7266b47", "language": "en", "original_url": "/docs/19/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/19/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "c827f460db781b39da305303c88e73729a419cd2b2b9dedb126d8ad5cbf02c95", "language": "en", "original_url": "/docs/19/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.18.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/19/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/19/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u91cd\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/19/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.29.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5728\u6ca1\u6709\u81f4\u547d\u9519\u8bef\u7684\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4e00\u76f4\u8fd0\u884c\uff0c\u76f4\u5230\u6536\u5230 <span class=\"systemitem\">SIGINT</span>\uff08<span class=\"keycap\"><strong>Control</strong></span>+<span class=\"keycap\"><strong>C</strong></span>\uff09\u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u81f3\u5c11\u5fc5\u987b\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\uff0c\u4ee5\u9009\u62e9\u8981\u6267\u884c\u7684\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code> \u548c <code class=\"option\">--dbname</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">--enable-two-phase \u548c --enable-failover \u9009\u9879\u53ef\u4ee5\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code> \u9009\u9879\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code>\u3001<code class=\"option\">--dbname</code> \u548c <code class=\"option\">--file</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u91cd\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--enable-failover</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5141\u8bb8\u5c06\u8be5\u69fd\u540c\u6b65\u5230\u5907\u5e93\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e <code class=\"option\">--create-slot</code> \u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5bf9\u4e8e <code class=\"option\">--start</code> \u64cd\u4f5c\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002\u9ed8\u8ba4\u503c\u4e3a 10 \u79d2\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/19/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/19/protocol-replication.html\" title=\"54.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a054.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/19/logicaldecoding-output-plugin.html\" title=\"47.6.\u00a0\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\">\u7b2c\u00a047.6\u00a0\u8282</a>\uff0c\u4e86\u89e3 <span class=\"productname\">PostgreSQL</span> \u63d0\u4f9b\u7684\u63d2\u4ef6\u4fe1\u606f\u3002\u9ed8\u8ba4\u503c\u662f<a class=\"xref\" href=\"/docs/19/test-decoding.html\" title=\"F.47.\u00a0test_decoding \u2014 \u7528\u4e8e WAL \u903b\u8f91\u89e3\u7801\u7684\u57fa\u4e8e SQL \u7684\u6d4b\u8bd5/\u793a\u4f8b\u6a21\u5757\">test_decoding</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/19/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5bf9\u4e8e\u4efb\u4f55\u4e00\u79cd\u64cd\u4f5c\u90fd\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt lang=\"zh\"><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--enable-two-phase</code><br/></span><span class=\"term\"><code class=\"option\">--two-phase</code>\uff08\u5df2\u5e9f\u5f03\uff09</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e<code class=\"option\">--create-slot</code>\u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0b\u5217\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8981\u8fde\u63a5\u5230\u7684\u6570\u636e\u5e93\u3002\u5176\u5177\u4f53\u542b\u4e49\u8bf7\u53c2\u89c1\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/19/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5728 <code class=\"option\">--create-slot</code> \u548c <code class=\"option\">--start</code> \u64cd\u4f5c\u4e2d\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.7\">\n<h2 lang=\"zh\">\u9000\u51fa\u72b6\u6001</h2>\n<p lang=\"zh\">\u5f53\u6536\u5230 <span class=\"systemitem\">SIGINT</span> \u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u7ec8\u6b62\u65f6\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4ee5\u72b6\u6001 0 \u9000\u51fa\u3002\uff08\u8fd9\u662f\u5176\u6b63\u5e38\u7ed3\u675f\u65b9\u5f0f\uff0c\u56e0\u6b64\u4e0d\u89c6\u4e3a\u9519\u8bef\u3002\uff09\u9047\u5230\u81f4\u547d\u9519\u8bef\u6216\u5176\u4ed6\u4fe1\u53f7\u65f6\uff0c\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.8\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/19/libpq-envars.html\" title=\"32.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.15\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.9\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u8f93\u51fa\u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.10\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/19/logicaldecoding-example.html\" title=\"47.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a047.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.11\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/19/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/19/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "85ddf4d857193d10c56987fc6f7c5b3fb7d1396111076673e2166c0cc61f13bc", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[10]/h2[0]", "#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[4]/p[5]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[23]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[25]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dt[22]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[7]/p[2]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]", "#APP-PGRECVLOGICAL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/19/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/19/facts/0/label": "Documented executable", "/versions/19/facts/1/label": "Executable version", "/versions/19/facts/2/label": "Reference inventory", "/versions/19/facts/2/value": "Client applications", "/versions/19/facts/3/label": "Option definition groups", "/versions/19/tables/0/title": "Documented options", "/versions/19/related/0/label": "libpq connection parameters", "/versions/19/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/19/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/19/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/19/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/19/tables/0/rows/4/summary": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot .", "/versions/19/tables/0/rows/5/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/19/tables/0/rows/6/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The default value is 10 seconds.", "/versions/19/tables/0/rows/7/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes.", "/versions/19/tables/0/rows/8/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/19/tables/0/rows/9/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/19/tables/0/columns/0/label": "Option and arguments", "/versions/19/tables/0/columns/1/label": "Description", "/versions/19/tables/0/rows/10/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/19/tables/0/rows/11/summary": "When creating a slot, use the specified logical decoding output plugin. See Section 47.6 for information about the plugins PostgreSQL provides. The default is test_decoding . This option has no effect if the slot already exists.", "/versions/19/tables/0/rows/12/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/19/tables/0/rows/13/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/19/tables/0/rows/14/summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "/versions/19/tables/0/rows/15/summary": "Enables verbose mode.", "/versions/19/tables/0/rows/16/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options.", "/versions/19/tables/0/rows/17/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/19/tables/0/rows/18/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/19/tables/0/rows/19/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/19/tables/0/rows/20/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/19/tables/0/rows/21/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/19/tables/0/rows/22/summary": "Print the pg_recvlogical version and exit.", "/versions/19/tables/0/rows/23/summary": "Show help about pg_recvlogical command line arguments, and exit.", "/versions/19/tables/0/rows/14/signature/text": "-t --enable-two-phase --two-phase (deprecated)"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "63a2e17d5939ce2069cc5c439cfd82c7058be18bf37fa809975ee4e042161f9c"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --slot and --dbname options are required for this action. The --enable-two-phase and --enable-failover options can be specified with --create-slot ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit. The --slot option is required for this action."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The --slot , --dbname , and --file options are required for this action. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["--enable-failover"], "signature": "--enable-failover", "description": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot ."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout . This parameter is required for --start ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The default value is 10 seconds. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Section 47.6 for information about the plugins PostgreSQL provides. The default is test_decoding . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name. This parameter is required for any of actions."}, {"names": ["-t", "--enable-two-phase", "--two-phase"], "signature": "-t --enable-two-phase --two-phase (deprecated)", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. This parameter is required for --create-slot and --start ."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "e9ce81359df13a6aca69534fe93297793b0f28a248800e47da8b2639c2198c12", "manual_language": "zh"}, "20": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "20devel"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "24"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5141\u8bb8\u5c06\u8be5\u69fd\u540c\u6b65\u5230\u5907\u5e93\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "--enable-failover"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002\u9ed8\u8ba4\u503c\u4e3a 10 \u79d2\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 47 \u7ae0 \u548c \u7b2c 54.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 47.6 \u8282 \uff0c\u4e86\u89e3 PostgreSQL \u63d0\u4f9b\u7684\u63d2\u4ef6\u4fe1\u606f\u3002\u9ed8\u8ba4\u503c\u662f test_decoding \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-t --enable-two-phase --two-phase \uff08\u5df2\u5e9f\u5f03\uff09"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u5230\u7684\u6570\u636e\u5e93\u3002\u5176\u5177\u4f53\u542b\u4e49\u8bf7\u53c2\u89c1\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/devel/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --slot and --dbname options are required for this action. The --enable-two-phase and --enable-failover options can be specified with --create-slot ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit. The --slot option is required for this action."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The --slot , --dbname , and --file options are required for this action. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["--enable-failover"], "summary": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot .", "signature": "--enable-failover", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot ."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout . This parameter is required for --start ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The default value is 10 seconds.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The default value is 10 seconds. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Section 47.6 for information about the plugins PostgreSQL provides. The default is test_decoding . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Section 47.6 for information about the plugins PostgreSQL provides. The default is test_decoding . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name. This parameter is required for any of actions."}, {"names": ["-t", "--enable-two-phase", "--two-phase"], "summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "signature": "-t --enable-two-phase --two-phase (deprecated)", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. This parameter is required for --create-slot and --start ."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/devel/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=20", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/20/postgresql-20-A4.pdf", "bytes": 16030631, "pages": 3052, "sha256": "bd5d82c0ce38fc18f92a0447818a91a193a261776bca1c37564bf9a683e177d0", "built_at": "2026-09-28"}, "US": {"url": "/files/documentation/pdf/20/postgresql-20-US.pdf", "bytes": 15936613, "pages": 3223, "sha256": "d97d9e0db479a02f4234b175f50fcad70c3661619afc8d6df9b9437882e3c299", "built_at": "2026-09-28"}}, "tree": "0", "index": "index.html", "major": "20", "pages": 1156, "release": "20devel", "source_url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "svg_assets": 6, "source_mode": "en SGML built with pinned official archive", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41", "source_snapshot_utc": "26-Sep-2026 20:22"}, "revision": "2eba5e0fd4c3bffb2803247b6cd537878e9d6ee5a6dfbe3c50ece8b421b80918", "evidence_kind": "English manual and source declarations", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "https://pg.center/docs/devel/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "20devel English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "41f5974cc601de99266a140d005c11de899e48c564a8bd07e13714154f808d32", "language": "en", "original_url": "/docs/devel/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/devel/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "a6c7ba748fa1d9feac5bb7cde41d1d36a1f4c26d5963e07fb103d02918b2a8ca", "language": "en", "original_url": "/docs/devel/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.18.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/devel/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u91cd\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/devel/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.29.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5728\u6ca1\u6709\u81f4\u547d\u9519\u8bef\u7684\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4e00\u76f4\u8fd0\u884c\uff0c\u76f4\u5230\u6536\u5230 <span class=\"systemitem\">SIGINT</span>\uff08<span class=\"keycap\"><strong>Control</strong></span>+<span class=\"keycap\"><strong>C</strong></span>\uff09\u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u81f3\u5c11\u5fc5\u987b\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\uff0c\u4ee5\u9009\u62e9\u8981\u6267\u884c\u7684\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code> \u548c <code class=\"option\">--dbname</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">--enable-two-phase \u548c --enable-failover \u9009\u9879\u53ef\u4ee5\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code> \u9009\u9879\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code>\u3001<code class=\"option\">--dbname</code> \u548c <code class=\"option\">--file</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u91cd\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--enable-failover</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5141\u8bb8\u5c06\u8be5\u69fd\u540c\u6b65\u5230\u5907\u5e93\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e <code class=\"option\">--create-slot</code> \u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5bf9\u4e8e <code class=\"option\">--start</code> \u64cd\u4f5c\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002\u9ed8\u8ba4\u503c\u4e3a 10 \u79d2\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/devel/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/devel/protocol-replication.html\" title=\"54.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a054.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/devel/logicaldecoding-output-plugin.html\" title=\"47.6.\u00a0\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\">\u7b2c\u00a047.6\u00a0\u8282</a>\uff0c\u4e86\u89e3 <span class=\"productname\">PostgreSQL</span> \u63d0\u4f9b\u7684\u63d2\u4ef6\u4fe1\u606f\u3002\u9ed8\u8ba4\u503c\u662f<a class=\"xref\" href=\"/docs/devel/test-decoding.html\" title=\"F.47.\u00a0test_decoding \u2014 \u7528\u4e8e WAL \u903b\u8f91\u89e3\u7801\u7684\u57fa\u4e8e SQL \u7684\u6d4b\u8bd5/\u793a\u4f8b\u6a21\u5757\">test_decoding</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/devel/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5bf9\u4e8e\u4efb\u4f55\u4e00\u79cd\u64cd\u4f5c\u90fd\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt lang=\"zh\"><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--enable-two-phase</code><br/></span><span class=\"term\"><code class=\"option\">--two-phase</code>\uff08\u5df2\u5e9f\u5f03\uff09</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e<code class=\"option\">--create-slot</code>\u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0b\u5217\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8981\u8fde\u63a5\u5230\u7684\u6570\u636e\u5e93\u3002\u5176\u5177\u4f53\u542b\u4e49\u8bf7\u53c2\u89c1\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/devel/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5728 <code class=\"option\">--create-slot</code> \u548c <code class=\"option\">--start</code> \u64cd\u4f5c\u4e2d\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.7\">\n<h2 lang=\"zh\">\u9000\u51fa\u72b6\u6001</h2>\n<p lang=\"zh\">\u5f53\u6536\u5230 <span class=\"systemitem\">SIGINT</span> \u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u7ec8\u6b62\u65f6\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4ee5\u72b6\u6001 0 \u9000\u51fa\u3002\uff08\u8fd9\u662f\u5176\u6b63\u5e38\u7ed3\u675f\u65b9\u5f0f\uff0c\u56e0\u6b64\u4e0d\u89c6\u4e3a\u9519\u8bef\u3002\uff09\u9047\u5230\u81f4\u547d\u9519\u8bef\u6216\u5176\u4ed6\u4fe1\u53f7\u65f6\uff0c\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.8\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/libpq-envars.html\" title=\"32.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.14\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.9\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u8f93\u51fa\u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.10\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/devel/logicaldecoding-example.html\" title=\"47.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a047.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.11\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/devel/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/devel/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "4bb5d3e9bf4f6e2f482b05e33bd8c524d008b64de09977c2624cbe29b3346ddb", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[10]/h2[0]", "#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[4]/p[5]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[23]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[25]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dt[22]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[7]/p[2]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]", "#APP-PGRECVLOGICAL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/summary": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/category": "Client applications", "/versions/20/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/20/facts/0/label": "Documented executable", "/versions/20/facts/1/label": "Executable version", "/versions/20/facts/2/label": "Reference inventory", "/versions/20/facts/2/value": "Client applications", "/versions/20/facts/3/label": "Option definition groups", "/versions/20/tables/0/title": "Documented options", "/versions/20/related/0/label": "libpq connection parameters", "/versions/20/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/20/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/20/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/20/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/20/tables/0/rows/4/summary": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot .", "/versions/20/tables/0/rows/5/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/20/tables/0/rows/6/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The default value is 10 seconds.", "/versions/20/tables/0/rows/7/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes.", "/versions/20/tables/0/rows/8/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/20/tables/0/rows/9/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/20/tables/0/columns/0/label": "Option and arguments", "/versions/20/tables/0/columns/1/label": "Description", "/versions/20/tables/0/rows/10/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/20/tables/0/rows/11/summary": "When creating a slot, use the specified logical decoding output plugin. See Section 47.6 for information about the plugins PostgreSQL provides. The default is test_decoding . This option has no effect if the slot already exists.", "/versions/20/tables/0/rows/12/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/20/tables/0/rows/13/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/20/tables/0/rows/14/summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "/versions/20/tables/0/rows/15/summary": "Enables verbose mode.", "/versions/20/tables/0/rows/16/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options.", "/versions/20/tables/0/rows/17/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/20/tables/0/rows/18/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/20/tables/0/rows/19/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/20/tables/0/rows/20/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/20/tables/0/rows/21/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/20/tables/0/rows/22/summary": "Print the pg_recvlogical version and exit.", "/versions/20/tables/0/rows/23/summary": "Show help about pg_recvlogical command line arguments, and exit.", "/versions/20/tables/0/rows/14/signature/text": "-t --enable-two-phase --two-phase (deprecated)"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "ea0c420e7c2812f93eade530cf20419ce8da03506233194f19088cd3c0725c27"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --slot and --dbname options are required for this action. The --enable-two-phase and --enable-failover options can be specified with --create-slot ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit. The --slot option is required for this action."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The --slot , --dbname , and --file options are required for this action. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["--enable-failover"], "signature": "--enable-failover", "description": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot ."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout . This parameter is required for --start ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The default value is 10 seconds. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Section 47.6 for information about the plugins PostgreSQL provides. The default is test_decoding . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name. This parameter is required for any of actions."}, {"names": ["-t", "--enable-two-phase", "--two-phase"], "signature": "-t --enable-two-phase --two-phase (deprecated)", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. This parameter is required for --create-slot and --start ."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "e9ce81359df13a6aca69534fe93297793b0f28a248800e47da8b2639c2198c12", "manual_language": "zh"}}}, "snapshot": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_recvlogical"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "18.6"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "24"}], "tables": [{"key": "options", "rows": [{"summary": "\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--create-slot"}}, {"summary": "\u5220\u9664\u7531 --slot \u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--drop-slot"}}, {"summary": "\u5f00\u59cb\u4ece\u7531 --slot \u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86 --no-loop \uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--start"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e --start \u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-E lsn --endpos= lsn"}}, {"summary": "\u5141\u8bb8\u5c06\u8be5\u69fd\u540c\u6b65\u5230\u5907\u5e93\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--enable-failover"}}, {"summary": "\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a - \u8868\u793a\u5199\u5165 stdout \u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a pg_recvlogical \u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77 fsync() \u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-F interval_seconds --fsync-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1 \u7b2c 47 \u7ae0 \u548c \u7b2c 54.4 \u8282 \u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-I lsn --startpos= lsn"}}, {"summary": "\u5f53\u6307\u5b9a --create-slot \u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "--if-not-exists"}}, {"summary": "\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-n --no-loop"}}, {"summary": "\u5c06\u9009\u9879 name \u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86 value \uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-o name [= value ] --option= name [= value ]"}}, {"summary": "\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1 \u7b2c 47 \u7ae0 \u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-P plugin --plugin= plugin"}}, {"summary": "\u8be5\u9009\u9879\u4e0e pg_receivewal \u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-s interval_seconds --status-interval= interval_seconds"}}, {"summary": "\u5728 --start \u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a slot_name \u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728 --create-slot \u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728 --drop-slot \u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-S slot_name --slot= slot_name"}}, {"summary": "\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-t --enable-two-phase --two-phase \uff08\u5df2\u5e9f\u5f03\uff09"}}, {"summary": "\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-v --verbose"}}, {"summary": "\u8981\u8fde\u63a5\u5230\u7684\u6570\u636e\u5e93\u3002\u5176\u5177\u4f53\u542b\u4e49\u8bf7\u53c2\u89c1\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002 dbname \u53ef\u4ee5\u662f\u4e00\u4e2a \u8fde\u63a5\u5b57\u7b26\u4e32 \u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-d dbname --dbname= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-h hostname-or-ip --host= hostname-or-ip"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-U user --username= user"}}, {"summary": "\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_recvlogical \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-W --password"}}, {"summary": "\u6253\u5370 pg_recvlogical \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-V --version"}}, {"summary": "\u663e\u793a pg_recvlogical \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pgrecvlogical.html", "text": "-? --help"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}], "options": [{"names": ["--create-slot"], "summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "signature": "--create-slot", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --slot and --dbname are required for this action. The --enable-two-phase and --enable-failover options can be specified with --create-slot ."}, {"names": ["--drop-slot"], "summary": "Drop the replication slot with the name specified by --slot , then exit.", "signature": "--drop-slot", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Drop the replication slot with the name specified by --slot , then exit. The --slot is required for this action."}, {"names": ["--start"], "summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "signature": "--start", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The --slot and --dbname , --file are required for this action. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "signature": "-E lsn --endpos= lsn", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["--enable-failover"], "summary": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot .", "signature": "--enable-failover", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot ."}, {"names": ["-f filename", "--file= filename"], "summary": "Write received and decoded transaction data into this file. Use - for stdout .", "signature": "-f filename --file= filename", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Write received and decoded transaction data into this file. Use - for stdout . This parameter is required for --start ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "signature": "-F interval_seconds --fsync-interval= interval_seconds", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes.", "signature": "-I lsn --startpos= lsn", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "signature": "--if-not-exists", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "signature": "-n --no-loop", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "signature": "-o name [= value ] --option= name [= value ]", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists.", "signature": "-P plugin --plugin= plugin", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "signature": "-s interval_seconds --status-interval= interval_seconds", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "signature": "-S slot_name --slot= slot_name", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name. This parameter is required for any of actions."}, {"names": ["-t", "--enable-two-phase", "--two-phase"], "summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "signature": "-t --enable-two-phase --two-phase (deprecated)", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "summary": "Enables verbose mode.", "signature": "-v --verbose", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options.", "signature": "-d dbname --dbname= dbname", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. This parameter is required for --create-slot and --start ."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h hostname-or-ip --host= hostname-or-ip", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "summary": "User name to connect as. Defaults to current operating system user name.", "signature": "-U user --username= user", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "summary": "Print the pg_recvlogical version and exit.", "signature": "-V --version", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "summary": "Show help about pg_recvlogical command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/18/app-pgrecvlogical.html", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "related": [{"url": "/wiki/conn/?v=18", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/18/postgresql-18-A4.pdf", "bytes": 15865106, "pages": 3154, "sha256": "19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/18/postgresql-18-US.pdf", "bytes": 15748059, "pages": 3328, "sha256": "facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319", "built_at": "2026-09-26"}}, "tree": "18", "index": "index.html", "major": "18", "pages": 1148, "release": "18.6", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "revision": "ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8", "evidence_kind": "English manual and source declarations", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/app-pgrecvlogical.html", "file": "app-pgrecvlogical.html", "label": "18.6 English manual \u00b7 app-pgrecvlogical.html", "anchor": "", "sha256": "3052f6f3caa9b5cca077878cde0cd9f927a9489aaf13cc41209fa504c1327f39", "language": "en", "original_url": "/docs/18/app-pgrecvlogical.html"}, {"url": "https://pg.center/docs/18/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "68f726af77272fe73a827be2b7b5958d0f2239a6f8ed44264e9d42496bfa4fd0", "language": "en", "original_url": "/docs/18/reference-client.html"}], "sections": [], "synopsis": ["pg_recvlogical [ option ...]"], "signature": "pg_recvlogical [ option ...]", "description": ["pg_recvlogical \u2014 \u63a7\u5236 PostgreSQL \u903b\u8f91\u89e3\u7801\u6d41"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGRECVLOGICAL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_recvlogical</span></span></h2>\n<p lang=\"zh\">pg_recvlogical \u2014 \u63a7\u5236 <span class=\"productname\">PostgreSQL</span> \u903b\u8f91\u89e3\u7801\u6d41</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.18.4.1\"><code class=\"command\">pg_recvlogical</code> [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.5\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u7528\u4e8e\u63a7\u5236\u903b\u8f91\u89e3\u7801\u590d\u5236\u69fd\uff0c\u5e76\u4ece\u8fd9\u7c7b\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u5b83\u4f1a\u521b\u5efa\u590d\u5236\u6a21\u5f0f\u8fde\u63a5\uff0c\u56e0\u6b64\u9664\u53d7\u5230\u4e0e<a class=\"xref\" href=\"/docs/18/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u76f8\u540c\u7684\u7ea6\u675f\u5916\uff0c\u8fd8\u8981\u6ee1\u8db3\u903b\u8f91\u590d\u5236\u7684\u76f8\u5173\u7ea6\u675f\uff08\u89c1<a class=\"xref\" href=\"/docs/18/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\uff09\u3002</p>\n<p lang=\"zh\"><code class=\"command\">pg_recvlogical</code>\u6ca1\u6709\u4e0e\u903b\u8f91\u89e3\u7801 SQL \u63a5\u53e3\u4e2d peek \u548c get \u6a21\u5f0f\u7b49\u4ef7\u7684\u529f\u80fd\u3002\u5b83\u4f1a\u5728\u63a5\u6536\u6570\u636e\u671f\u95f4\u60f0\u6027\u5730\u4e3a\u8fd9\u4e9b\u6570\u636e\u53d1\u9001\u91cd\u653e\u786e\u8ba4\uff0c\u5e76\u5728\u6b63\u5e38\u9000\u51fa\u65f6\u53d1\u9001\u786e\u8ba4\u3002\u82e5\u8981\u5728\u4e0d\u6d88\u8d39\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u67d0\u4e2a\u69fd\u4e0a\u7684\u5f85\u5904\u7406\u6570\u636e\uff0c\u8bf7\u4f7f\u7528<a class=\"link\" href=\"/docs/18/functions-admin.html#FUNCTIONS-REPLICATION\" title=\"9.28.6.\u00a0\u590d\u5236\u7ba1\u7406\u51fd\u6570\"><code class=\"function\">pg_logical_slot_peek_changes</code></a>\u3002</p>\n<p lang=\"zh\">\u5728\u6ca1\u6709\u81f4\u547d\u9519\u8bef\u7684\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4e00\u76f4\u8fd0\u884c\uff0c\u76f4\u5230\u6536\u5230 <span class=\"systemitem\">SIGINT</span>\uff08<span class=\"keycap\"><strong>Control</strong></span>+<span class=\"keycap\"><strong>C</strong></span>\uff09\u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u3002</p>\n<p lang=\"zh\">\u5f53 <span class=\"application\">pg_recvlogical</span> \u6536\u5230 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u65f6\uff0c\u5b83\u4f1a\u5173\u95ed\u5f53\u524d\u8f93\u51fa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 <code class=\"option\">--file</code> \u9009\u9879\u6307\u5b9a\u7684\u6587\u4ef6\u540d\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u901a\u8fc7\u5148\u91cd\u547d\u540d\u5f53\u524d\u6587\u4ef6\uff0c\u518d\u5411 <span class=\"application\">pg_recvlogical</span> \u53d1\u9001 <span class=\"systemitem\">SIGHUP</span> \u4fe1\u53f7\u6765\u8f6e\u6362\u8f93\u51fa\u6587\u4ef6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u81f3\u5c11\u5fc5\u987b\u6307\u5b9a\u4ee5\u4e0b\u9009\u9879\u4e4b\u4e00\uff0c\u4ee5\u9009\u62e9\u8981\u6267\u884c\u7684\u64cd\u4f5c\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">--create-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a --dbname \u6307\u5b9a\u7684\u6570\u636e\u5e93\u521b\u5efa\u65b0\u7684\u903b\u8f91\u590d\u5236\u69fd\uff0c\u540d\u79f0\u7531 --slot \u6307\u5b9a\uff0c\u8f93\u51fa\u63d2\u4ef6\u7531 --plugin \u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code> \u548c <code class=\"option\">--dbname</code>\u3002</p>\n<p lang=\"zh\">--enable-two-phase \u548c --enable-failover \u9009\u9879\u53ef\u4ee5\u4e0e --create-slot \u4e00\u8d77\u6307\u5b9a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--drop-slot</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5220\u9664\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u540d\u79f0\u7684\u590d\u5236\u69fd\uff0c\u7136\u540e\u9000\u51fa\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code>\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--start</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f00\u59cb\u4ece\u7531<code class=\"option\">--slot</code>\u6307\u5b9a\u7684\u903b\u8f91\u590d\u5236\u69fd\u6d41\u5f0f\u4f20\u8f93\u66f4\u6539\uff0c\u5e76\u6301\u7eed\u8fd0\u884c\u76f4\u5230\u88ab\u4fe1\u53f7\u7ec8\u6b62\u3002\u5982\u679c\u670d\u52a1\u7aef\u7684\u66f4\u6539\u6d41\u56e0\u670d\u52a1\u5668\u5173\u95ed\u6216\u65ad\u5f00\u8fde\u63a5\u800c\u7ed3\u675f\uff0c\u5219\u9664\u975e\u6307\u5b9a\u4e86<code class=\"option\">--no-loop</code>\uff0c\u5426\u5219\u4f1a\u5faa\u73af\u91cd\u8bd5\u3002</p>\n<p lang=\"zh\">\u6b64\u64cd\u4f5c\u5fc5\u987b\u6307\u5b9a <code class=\"option\">--slot</code>\u3001<code class=\"option\">--dbname</code> \u548c <code class=\"option\">--file</code>\u3002</p>\n<p lang=\"zh\">\u6d41\u683c\u5f0f\u7531\u521b\u5efa\u8be5\u69fd\u65f6\u6307\u5b9a\u7684\u8f93\u51fa\u63d2\u4ef6\u51b3\u5b9a\u3002</p>\n<p lang=\"zh\">\u8be5\u8fde\u63a5\u5fc5\u987b\u8fde\u5230\u521b\u5efa\u8be5\u69fd\u65f6\u6240\u7528\u7684\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\"><code class=\"option\">--create-slot</code>\u548c<code class=\"option\">--start</code>\u53ef\u4ee5\u4e00\u540c\u6307\u5b9a\u3002<code class=\"option\">--drop-slot</code>\u4e0d\u80fd\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ec4\u5408\u4f7f\u7528\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u4ee5\u53ca\u5176\u4ed6\u590d\u5236\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--endpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u5f53\u63a5\u6536\u8fbe\u5230\u6307\u5b9a\u7684 LSN \u65f6\uff0c\u81ea\u52a8\u505c\u6b62\u590d\u5236\uff0c\u5e76\u4ee5\u6b63\u5e38\u9000\u51fa\u72b6\u6001 0 \u9000\u51fa\u3002\u5982\u679c\u5728\u975e<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\u6307\u5b9a\uff0c\u5219\u4f1a\u62a5\u9519\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5b58\u5728 LSN \u6070\u597d\u7b49\u4e8e<em class=\"replaceable\"><code>lsn</code></em>\u7684\u8bb0\u5f55\uff0c\u5219\u8be5\u8bb0\u5f55\u4f1a\u88ab\u8f93\u51fa\u3002</p>\n<p lang=\"zh\"><code class=\"option\">--endpos</code>\u9009\u9879\u4e0d\u4f1a\u611f\u77e5\u4e8b\u52a1\u8fb9\u754c\uff0c\u56e0\u6b64\u53ef\u80fd\u4f1a\u5728\u4e8b\u52a1\u4e2d\u9014\u622a\u65ad\u8f93\u51fa\u3002\u4efb\u4f55\u53ea\u8f93\u51fa\u4e86\u4e00\u90e8\u5206\u7684\u4e8b\u52a1\u90fd\u4e0d\u4f1a\u88ab\u6d88\u8d39\uff0c\u5e76\u4f1a\u5728\u4e0b\u6b21\u4ece\u8be5\u69fd\u8bfb\u53d6\u65f6\u518d\u6b21\u91cd\u653e\u3002\u5355\u6761\u6d88\u606f\u6c38\u8fdc\u4e0d\u4f1a\u88ab\u622a\u65ad\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--enable-failover</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5141\u8bb8\u5c06\u8be5\u69fd\u540c\u6b65\u5230\u5907\u5e93\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e <code class=\"option\">--create-slot</code> \u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5c06\u63a5\u6536\u5230\u5e76\u89e3\u7801\u540e\u7684\u4e8b\u52a1\u6570\u636e\u5199\u5165\u8be5\u6587\u4ef6\u3002\u6307\u5b9a<code class=\"literal\">-</code>\u8868\u793a\u5199\u5165<span class=\"systemitem\">stdout</span>\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5bf9\u4e8e <code class=\"option\">--start</code> \u64cd\u4f5c\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-F <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--fsync-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a<span class=\"application\">pg_recvlogical</span>\u5e94\u5f53\u4ee5\u591a\u9ad8\u7684\u9891\u7387\u53d1\u8d77<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4ee5\u786e\u4fdd\u8f93\u51fa\u6587\u4ef6\u5b89\u5168\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u670d\u52a1\u5668\u4f1a\u5076\u5c14\u8981\u6c42\u5ba2\u6237\u7aef\u6267\u884c\u5237\u76d8\uff0c\u5e76\u5c06\u5237\u76d8\u4f4d\u7f6e\u62a5\u544a\u7ed9\u670d\u52a1\u5668\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u6b64\u8bbe\u7f6e\u8fd8\u4f1a\u66f4\u9891\u7e41\u5730\u6267\u884c\u5237\u76d8\u3002</p>\n<p lang=\"zh\">\u5c06\u95f4\u9694\u6307\u5b9a\u4e3a<code class=\"literal\">0</code>\u4f1a\u5b8c\u5168\u7981\u7528<code class=\"function\">fsync()</code>\u8c03\u7528\uff0c\u4f46\u4ecd\u4f1a\u5411\u670d\u52a1\u5668\u62a5\u544a\u8fdb\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53d1\u751f\u5d29\u6e83\u65f6\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-I <em class=\"replaceable\"><code>lsn</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--startpos=<em class=\"replaceable\"><code>lsn</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4ece\u7ed9\u5b9a\u7684 LSN \u5f00\u59cb\u590d\u5236\u3002\u5173\u4e8e\u5176\u5f71\u54cd\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\u548c<a class=\"xref\" href=\"/docs/18/protocol-replication.html\" title=\"54.4.\u00a0\u6d41\u590d\u5236\u534f\u8bae\">\u7b2c\u00a054.4\u00a0\u8282</a>\u4e2d\u7684\u8bf4\u660e\u3002\u5728\u5176\u4ed6\u6a21\u5f0f\u4e0b\u4f1a\u5ffd\u7565\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-not-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u6307\u5b9a<code class=\"option\">--create-slot</code>\u4e14\u6307\u5b9a\u540d\u79f0\u7684\u69fd\u5df2\u5b58\u5728\u65f6\uff0c\u4e0d\u62a5\u9519\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br/></span><span class=\"term\"><code class=\"option\">--no-loop</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e22\u5931\u65f6\uff0c\u4e0d\u8981\u5faa\u73af\u91cd\u8bd5\uff0c\u76f4\u63a5\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code><br/></span><span class=\"term\"><code class=\"option\">--option=<em class=\"replaceable\"><code>name</code></em>[=<em class=\"replaceable\"><code>value</code></em>]</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u9009\u9879<em class=\"replaceable\"><code>name</code></em>\u4f20\u9012\u7ed9\u8f93\u51fa\u63d2\u4ef6\uff1b\u5982\u679c\u6307\u5b9a\u4e86<em class=\"replaceable\"><code>value</code></em>\uff0c\u5219\u5c06\u5176\u7528\u4f5c\u8be5\u9009\u9879\u7684\u503c\u3002\u53ef\u7528\u9009\u9879\u53ca\u5176\u6548\u679c\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u8f93\u51fa\u63d2\u4ef6\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-P <em class=\"replaceable\"><code>plugin</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--plugin=<em class=\"replaceable\"><code>plugin</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u521b\u5efa\u8be5\u69fd\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u903b\u8f91\u89e3\u7801\u8f93\u51fa\u63d2\u4ef6\u3002\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/logicaldecoding.html\" title=\"\u7b2c\u00a047\u00a0\u7ae0\u00a0\u903b\u8f91\u89e3\u7801\">\u7b2c\u00a047\u00a0\u7ae0</a>\u3002\u5982\u679c\u8be5\u69fd\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u6b64\u9009\u9879\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s <em class=\"replaceable\"><code>interval_seconds</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--status-interval=<em class=\"replaceable\"><code>interval_seconds</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u4e0e<a class=\"xref\" href=\"/docs/18/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a>\u4e2d\u540c\u540d\u9009\u9879\u7684\u6548\u679c\u76f8\u540c\u3002\u53c2\u89c1\u8be5\u5904\u8bf4\u660e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>slot_name</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--slot=<em class=\"replaceable\"><code>slot_name</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728<code class=\"option\">--start</code>\u6a21\u5f0f\u4e0b\uff0c\u4f7f\u7528\u540d\u4e3a<em class=\"replaceable\"><code>slot_name</code></em>\u7684\u73b0\u6709\u903b\u8f91\u590d\u5236\u69fd\u3002\u5728<code class=\"option\">--create-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u6b64\u540d\u79f0\u521b\u5efa\u8be5\u69fd\u3002\u5728<code class=\"option\">--drop-slot</code>\u6a21\u5f0f\u4e0b\uff0c\u5220\u9664\u6b64\u540d\u79f0\u7684\u69fd\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5bf9\u4e8e\u4efb\u4f55\u4e00\u79cd\u64cd\u4f5c\u90fd\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt lang=\"zh\"><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--enable-two-phase</code><br/></span><span class=\"term\"><code class=\"option\">--two-phase</code>\uff08\u5df2\u5e9f\u5f03\uff09</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u5bf9\u9884\u5907\u4e8b\u52a1\u7684\u89e3\u7801\u3002\u6b64\u9009\u9879\u53ea\u80fd\u4e0e<code class=\"option\">--create-slot</code>\u4e00\u8d77\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u542f\u7528\u8be6\u7ec6\u6a21\u5f0f\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0b\u5217\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8981\u8fde\u63a5\u5230\u7684\u6570\u636e\u5e93\u3002\u5176\u5177\u4f53\u542b\u4e49\u8bf7\u53c2\u89c1\u5404\u64cd\u4f5c\u7684\u8bf4\u660e\u3002<em class=\"replaceable\"><code>dbname</code></em>\u53ef\u4ee5\u662f\u4e00\u4e2a<a class=\"link\" href=\"/docs/18/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u6b64\u53c2\u6570\u5728 <code class=\"option\">--create-slot</code> \u548c <code class=\"option\">--start</code> \u64cd\u4f5c\u4e2d\u662f\u5fc5\u9700\u7684\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>hostname-or-ip</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>hostname-or-ip</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u8fd0\u884c\u6240\u5728\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5b83\u4f1a\u88ab\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u5c06\u5c1d\u8bd5 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u76d1\u542c\u8fde\u63a5\u6240\u7528\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGPORT</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u7684\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>user</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>user</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u4e3a\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u5bc6\u7801\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code>\u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\uff0c\u56e0\u4e3a\u5728\u8fd9\u4e9b\u573a\u666f\u4e2d\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_recvlogical</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8fd9\u4e2a\u9009\u9879\u5e76\u975e\u5fc5\u4e0d\u53ef\u5c11\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_recvlogical</span>\u9700\u8981\u5148\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\uff0c\u624d\u80fd\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528 <code class=\"option\">-W</code>\u6765\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e0b\u5217\u9644\u52a0\u9009\u9879\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_recvlogical</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a<span class=\"application\">pg_recvlogical</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.7\">\n<h2 lang=\"zh\">\u9000\u51fa\u72b6\u6001</h2>\n<p lang=\"zh\">\u5f53\u6536\u5230 <span class=\"systemitem\">SIGINT</span> \u6216 <span class=\"systemitem\">SIGTERM</span> \u4fe1\u53f7\u7ec8\u6b62\u65f6\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u4ee5\u72b6\u6001 0 \u9000\u51fa\u3002\uff08\u8fd9\u662f\u5176\u6b63\u5e38\u7ed3\u675f\u65b9\u5f0f\uff0c\u56e0\u6b64\u4e0d\u89c6\u4e3a\u9519\u8bef\u3002\uff09\u9047\u5230\u81f4\u547d\u9519\u8bef\u6216\u5176\u4ed6\u4fe1\u53f7\u65f6\uff0c\u9000\u51fa\u72b6\u6001\u4e3a\u975e\u96f6\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.8\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6<span class=\"productname\">PostgreSQL</span>\u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528<span class=\"application\">libpq</span>\u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/18/libpq-envars.html\" title=\"32.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.15\u00a0\u8282</a>\uff09\u3002</p>\n<p lang=\"zh\">\u73af\u5883\u53d8\u91cf<code class=\"envar\">PG_COLOR</code>\u6307\u5b9a\u662f\u5426\u5728\u8bca\u65ad\u6d88\u606f\u4e2d\u4f7f\u7528\u989c\u8272\u3002\u53ef\u80fd\u7684\u503c\u4e3a<code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c<code class=\"literal\">never</code>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.9\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u5982\u679c\u6e90\u96c6\u7c07\u542f\u7528\u4e86\u7ec4\u6743\u9650\uff0c<span class=\"application\">pg_recvlogical</span>\u4f1a\u5728\u8f93\u51fa\u6587\u4ef6\u4e0a\u4fdd\u7559\u8fd9\u4e9b\u7ec4\u6743\u9650\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.10\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u793a\u4f8b\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/logicaldecoding-example.html\" title=\"47.1.\u00a0\u903b\u8f91\u89e3\u7801\u793a\u4f8b\">\u7b2c\u00a047.1\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.18.11\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2><span class=\"simplelist\"><a class=\"xref\" href=\"https://pg.center/docs/18/app-pgreceivewal.html\" title=\"pg_receivewal\"><span class=\"refentrytitle\"><span class=\"application\">pg_receivewal</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgrecvlogical.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/app-pgrecvlogical.html", "method": "same-major semantic node", "sha256": "2850074000a597324b32b05230f97ea08a066b95d7947ce2ae0299c15e3a3ef9", "language": "zh", "matched_nodes": ["#APP-PGRECVLOGICAL/div[10]/h2[0]", "#APP-PGRECVLOGICAL/div[2]/p[1]", "#APP-PGRECVLOGICAL/div[3]/h2[0]", "#APP-PGRECVLOGICAL/div[4]/p[1]", "#APP-PGRECVLOGICAL/div[4]/p[2]", "#APP-PGRECVLOGICAL/div[4]/p[3]", "#APP-PGRECVLOGICAL/div[4]/p[4]", "#APP-PGRECVLOGICAL/div[4]/p[5]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[3]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[2]/dl[0]/dd[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[11]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[13]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[15]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[17]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[19]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[1]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[21]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[23]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[25]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[7]/p[2]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[5]/dl[0]/dt[22]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[11]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]/p[0]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[1]/p[1]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[5]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[7]", "#APP-PGRECVLOGICAL/div[5]/div[7]/dl[0]/dd[9]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[1]", "#APP-PGRECVLOGICAL/div[5]/div[9]/dl[0]/dd[3]", "#APP-PGRECVLOGICAL/div[5]/p[1]", "#APP-PGRECVLOGICAL/div[5]/p[3]", "#APP-PGRECVLOGICAL/div[5]/p[4]", "#APP-PGRECVLOGICAL/div[5]/p[6]", "#APP-PGRECVLOGICAL/div[5]/p[8]", "#APP-PGRECVLOGICAL/div[6]/h2[0]", "#APP-PGRECVLOGICAL/div[6]/p[1]", "#APP-PGRECVLOGICAL/div[7]/h2[0]", "#APP-PGRECVLOGICAL/div[7]/p[1]", "#APP-PGRECVLOGICAL/div[7]/p[2]", "#APP-PGRECVLOGICAL/div[8]/h2[0]", "#APP-PGRECVLOGICAL/div[8]/p[1]", "#APP-PGRECVLOGICAL/div[9]/h2[0]", "#APP-PGRECVLOGICAL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "pg_recvlogical \u2014 control PostgreSQL logical decoding streams", "/versions/18/facts/0/label": "Documented executable", "/versions/18/facts/1/label": "Executable version", "/versions/18/facts/2/label": "Reference inventory", "/versions/18/facts/2/value": "Client applications", "/versions/18/facts/3/label": "Option definition groups", "/versions/18/tables/0/title": "Documented options", "/versions/18/related/0/label": "libpq connection parameters", "/versions/18/tables/0/rows/0/summary": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname .", "/versions/18/tables/0/rows/1/summary": "Drop the replication slot with the name specified by --slot , then exit.", "/versions/18/tables/0/rows/2/summary": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified.", "/versions/18/tables/0/rows/3/summary": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised.", "/versions/18/tables/0/rows/4/summary": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot .", "/versions/18/tables/0/rows/5/summary": "Write received and decoded transaction data into this file. Use - for stdout .", "/versions/18/tables/0/rows/6/summary": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk.", "/versions/18/tables/0/rows/7/summary": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes.", "/versions/18/tables/0/rows/8/summary": "Do not error out when --create-slot is specified and a slot with the specified name already exists.", "/versions/18/tables/0/rows/9/summary": "When the connection to the server is lost, do not retry in a loop, just exit.", "/versions/18/tables/0/columns/0/label": "Option and arguments", "/versions/18/tables/0/columns/1/label": "Description", "/versions/18/tables/0/rows/10/summary": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin.", "/versions/18/tables/0/rows/11/summary": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists.", "/versions/18/tables/0/rows/12/summary": "This option has the same effect as the option of the same name in pg_receivewal . See the description there.", "/versions/18/tables/0/rows/13/summary": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name.", "/versions/18/tables/0/rows/14/summary": "Enables decoding of prepared transactions. This option may only be specified with --create-slot .", "/versions/18/tables/0/rows/15/summary": "Enables verbose mode.", "/versions/18/tables/0/rows/16/summary": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options.", "/versions/18/tables/0/rows/17/summary": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/18/tables/0/rows/18/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/18/tables/0/rows/19/summary": "User name to connect as. Defaults to current operating system user name.", "/versions/18/tables/0/rows/20/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/18/tables/0/rows/21/summary": "Force pg_recvlogical to prompt for a password before connecting to a database.", "/versions/18/tables/0/rows/22/summary": "Print the pg_recvlogical version and exit.", "/versions/18/tables/0/rows/23/summary": "Show help about pg_recvlogical command line arguments, and exit.", "/versions/18/tables/0/rows/14/signature/text": "-t --enable-two-phase --two-phase (deprecated)"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "765fe84c6f6c277d85ddf34edb0346bd4ac8f9941ce70c7111717e30d4aa0fd2"}, "comparison_data": {"options": [{"names": ["--create-slot"], "signature": "--create-slot", "description": "Create a new logical replication slot with the name specified by --slot , using the output plugin specified by --plugin , for the database specified by --dbname . The --slot and --dbname are required for this action. The --enable-two-phase and --enable-failover options can be specified with --create-slot ."}, {"names": ["--drop-slot"], "signature": "--drop-slot", "description": "Drop the replication slot with the name specified by --slot , then exit. The --slot is required for this action."}, {"names": ["--start"], "signature": "--start", "description": "Begin streaming changes from the logical replication slot specified by --slot , continuing until terminated by a signal. If the server side change stream ends with a server shutdown or disconnect, retry in a loop unless --no-loop is specified. The --slot and --dbname , --file are required for this action. The stream format is determined by the output plugin specified when the slot was created. The connection must be to the same database used to create the slot."}, {"names": ["-E lsn", "--endpos= lsn"], "signature": "-E lsn --endpos= lsn", "description": "In --start mode, automatically stop replication and exit with normal exit status 0 when receiving reaches the specified LSN. If specified when not in --start mode, an error is raised. If there's a record with LSN exactly equal to lsn , the record will be output. The --endpos option is not aware of transaction boundaries and may truncate output partway through a transaction. Any partially output transaction will not be consumed and will be replayed again when the slot is next read from. Individual messages are never truncated."}, {"names": ["--enable-failover"], "signature": "--enable-failover", "description": "Enables the slot to be synchronized to the standbys. This option may only be specified with --create-slot ."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Write received and decoded transaction data into this file. Use - for stdout . This parameter is required for --start ."}, {"names": ["-F interval_seconds", "--fsync-interval= interval_seconds"], "signature": "-F interval_seconds --fsync-interval= interval_seconds", "description": "Specifies how often pg_recvlogical should issue fsync() calls to ensure the output file is safely flushed to disk. The server will occasionally request the client to perform a flush and report the flush position to the server. This setting is in addition to that, to perform flushes more frequently. Specifying an interval of 0 disables issuing fsync() calls altogether, while still reporting progress to the server. In this case, data could be lost in the event of a crash."}, {"names": ["-I lsn", "--startpos= lsn"], "signature": "-I lsn --startpos= lsn", "description": "In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 47 and Section 54.4 . Ignored in other modes."}, {"names": ["--if-not-exists"], "signature": "--if-not-exists", "description": "Do not error out when --create-slot is specified and a slot with the specified name already exists."}, {"names": ["-n", "--no-loop"], "signature": "-n --no-loop", "description": "When the connection to the server is lost, do not retry in a loop, just exit."}, {"names": ["-o name [= value ]", "--option= name [= value ]"], "signature": "-o name [= value ] --option= name [= value ]", "description": "Pass the option name to the output plugin with, if specified, the option value value . Which options exist and their effects depends on the used output plugin."}, {"names": ["-P plugin", "--plugin= plugin"], "signature": "-P plugin --plugin= plugin", "description": "When creating a slot, use the specified logical decoding output plugin. See Chapter 47 . This option has no effect if the slot already exists."}, {"names": ["-s interval_seconds", "--status-interval= interval_seconds"], "signature": "-s interval_seconds --status-interval= interval_seconds", "description": "This option has the same effect as the option of the same name in pg_receivewal . See the description there."}, {"names": ["-S slot_name", "--slot= slot_name"], "signature": "-S slot_name --slot= slot_name", "description": "In --start mode, use the existing logical replication slot named slot_name . In --create-slot mode, create the slot with this name. In --drop-slot mode, delete the slot with this name. This parameter is required for any of actions."}, {"names": ["-t", "--enable-two-phase", "--two-phase"], "signature": "-t --enable-two-phase --two-phase (deprecated)", "description": "Enables decoding of prepared transactions. This option may only be specified with --create-slot ."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Enables verbose mode."}, {"names": ["-d dbname", "--dbname= dbname"], "signature": "-d dbname --dbname= dbname", "description": "The database to connect to. See the description of the actions for what this means in detail. The dbname can be a connection string . If so, connection string parameters will override any conflicting command line options. This parameter is required for --create-slot and --start ."}, {"names": ["-h hostname-or-ip", "--host= hostname-or-ip"], "signature": "-h hostname-or-ip --host= hostname-or-ip", "description": "Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U user", "--username= user"], "signature": "-U user --username= user", "description": "User name to connect as. Defaults to current operating system user name."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_recvlogical to prompt for a password before connecting to a database. This option is never essential, since pg_recvlogical will automatically prompt for a password if the server demands password authentication. However, pg_recvlogical will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_recvlogical version and exit."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_recvlogical command line arguments, and exit."}], "synopsis": ["pg_recvlogical [ option ...]"], "environment": []}, "comparison_hash": "7e4d124b6d72f9dbcf5a935f6ef5cfdac9d56466c979b9dabadfcd070a54dfeb", "manual_language": "zh"}, "comparison": {"left": "11", "right": "12", "status": "changed", "diff": "--- PostgreSQL 11\n+++ PostgreSQL 12\n@@ -47,7 +47,7 @@\n       \"signature\": \"-F interval_seconds --fsync-interval= interval_seconds\"\n     },\n     {\n-      \"description\": \"In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 49 and Section 53.4 . Ignored in other modes.\",\n+      \"description\": \"In --start mode, start replication from the given LSN. For details on the effect of this, see the documentation in Chapter 48 and Section 52.4 . Ignored in other modes.\",\n       \"names\": [\n         \"-I lsn\",\n         \"--startpos= lsn\"\n@@ -78,7 +78,7 @@\n       \"signature\": \"-o name [= value ] --option= name [= value ]\"\n     },\n     {\n-      \"description\": \"When creating a slot, use the specified logical decoding output plugin. See Chapter 49 . This option has no effect if the slot already exists.\",\n+      \"description\": \"When creating a slot, use the specified logical decoding output plugin. See Chapter 48 . This option has no effect if the slot already exists.\",\n       \"names\": [\n         \"-P plugin\",\n         \"--plugin= plugin\""}}