Re: [HACKERS] Logical replication existing data copy - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: [HACKERS] Logical replication existing data copy
Date
Msg-id 837653af-ec47-dacb-ae33-4a52441fd9ab@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Logical replication existing data copy  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses Re: [HACKERS] Logical replication existing data copy  (Erik Rijkers <er@xs4all.nl>)
Re: [HACKERS] Logical replication existing data copy  (Erik Rijkers <er@xs4all.nl>)
Re: [HACKERS] Logical replication existing data copy  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [HACKERS] Logical replication existing data copy  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Hi,

updated and rebased version of the patch attached.

I changed a bit how the table handover is done between tablesync worker
and apply worker.

I also changed tablesync worker to do whole thing including catchup in
single transaction, that might mean more bloat on very active servers
but it's currently the only way to make sure that if it fails it can
restart as otherwise there would be leftover data from previous attempt
with no way of continuing from the point of failure. This means that
some of the synchronization states now only exist in memory and are
never saved in catalog, I separated those to make that clear. Hopefully
this didn't break anything.

I also fixed thinko about how we handle the LSN returned by
CREATE_REPLICATION_SLOT which should fix the missing row issue Erik
reported earlier (this time it wasn't snapbuild.c issue :) ).

And lastly I changed the automagic around exporting, not exporting and
using the snapshot produced by CREATE_REPLICATION_SLOT into explicit
parameter for the CREATE_REPLICATION_SLOT command (and added simple
framework for adding more of those if needed in the future).

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Logical Replication and Character encoding
Next
From: Amos Bird
Date:
Subject: [HACKERS] PATCH: psql show index with type info