Re: Stream consistent snapshot via a logical decoding plugin as a series of INSERTs - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Stream consistent snapshot via a logical decoding plugin as a series of INSERTs
Date
Msg-id CANP8+jJcoCEPYe9TF01PNequemT_-NQET5fX1TB1tqaYYrD1cg@mail.gmail.com
Whole thread Raw
In response to Stream consistent snapshot via a logical decoding plugin as a series of INSERTs  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
Responses Re: Stream consistent snapshot via a logical decoding plugin as a series of INSERTs
List pgsql-hackers
On 15 January 2016 at 08:30, Shulgin, Oleksandr <oleksandr.shulgin@zalando.de> wrote:
 
I'd like to propose generic functions (probably in an extension, or in core if not possible otherwise) to facilitate streaming existing data from the database *in the same format* that one would get if these would be the changes decoded by a logical decoding plugin.

The idea is to use a snapshot returned from CREATE_REPLICATION_SLOT command of the replication protocol to get a consistent snapshot of the database, then start listening to new changes on the slot.

It sounds like this is already possible. 

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan
Next
From: Vladimir Sitnikov
Date:
Subject: Insert values() per-statement overhead