Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z5ER9-0003T7-4f for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Jun 2015 14:35:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z5ER7-0007LW-Ib for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Jun 2015 14:35:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z51Ua-0007mC-Fe for pgsql-bugs@postgresql.org; Wed, 17 Jun 2015 00:46:12 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Z51UT-00044z-5t for pgsql-bugs@postgresql.org; Wed, 17 Jun 2015 00:46:11 +0000 MIME-Version: 1.0 Subject: BUG #13448: DOC about : pg_dump use logical replication snapshot To: pgsql-bugs@postgresql.org From: digoal@126.com Date: Wed, 17 Jun 2015 00:45:24 +0000 Message-ID: <20150617004524.2730.86600@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13448 Logged by: digoal Email address: digoal@126.com PostgreSQL version: Unsupported/Unknown Operating system: CentOS 6.x x64 Description: PostgreSQL 9.5 release notes: E.1.3.9.2. pg_dump Allow pg_dump to share a snapshot taken by another session using --snapshot (Simon Riggs, Michael Paquier) The remote snapshot must have been exported by pg_export_snapshot() or been defined when creating a logical replication slot. This can be used by parallel pg_dump to use a consistent snapshot across pg_dump processes. There is no problem, But how to use a logical replication slot's snapshot? Now we must do it manual? Like this: pg95@db-172-16-3-150-> psql 'hostaddr=127.0.0.1 port=1922 user=postgres dbname=postgres replication=database' psql (9.5devel) Type "help" for help. postgres=# CREATE_REPLICATION_SLOT ab12 LOGICAL "/opt/pgsql9.5/lib/test_decoding.so"; slot_name | consistent_point | snapshot_name | output_plugin -----------+------------------+---------------+------------------------------------ ab12 | 7/77B59A00 | 00000736-1 | /opt/pgsql9.5/lib/test_decoding.so (1 row) pg95@db-172-16-3-150-> pg_dump --snapshot=00000736-1 And there is no document descript it. Another command pg_recvlogical also can use stream replication protocol to create slot,but it exit soon and no any snapshot info output to stdout, we can use log_replication_commands to trace the snapshot, but we cann't use it because pg_recvlogical exit soon. I think , pg_recvlogical can add option --wait-dump | --wait second for --create-slot, wait a moment or wait some body import the snapshot, then close it or send the next replication commands. Regards, Digoal -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs