Re: Single transaction in the tablesync worker? - Mailing list pgsql-hackers

From Peter Smith
Subject Re: Single transaction in the tablesync worker?
Date
Msg-id CAHut+PsonJzarxSBWkOM=MjoEpaq53ShBJoTT9LHJskwP3OvZA@mail.gmail.com
Whole thread Raw
In response to Re: Single transaction in the tablesync worker?  (Peter Smith <smithpb2250@gmail.com>)
Responses RE: Single transaction in the tablesync worker?
Re: Single transaction in the tablesync worker?
List pgsql-hackers
Hi Amit.

PSA the v12 patch for the Tablesync Solution1.

Differences from v11:
  + Added PG docs to mention the tablesync slot
  + Refactored tablesync slot drop (done by
DropSubscription/process_syncing_tables_for_sync)
  + Fixed PG docs mentioning wrong state code
  + Fixed wrong code comment describing TCOPYDONE state

====

Features:

* The tablesync slot is now permanent instead of temporary. The
tablesync slot name is no longer tied to the Subscription slot na

* The tablesync slot cleanup (drop) code is added for DropSubscription
and for process_syncing_tables_for_sync functions

* The tablesync worker is now allowing multiple tx instead of single tx

* A new state (SUBREL_STATE_TCOPYDONE) is persisted after a successful
copy_table in LogicalRepSyncTableStart.

* If a re-launched tablesync finds state SUBREL_STATE_TCOPYDONE then
it will bypass the initial copy_table phase.

* Now tablesync sets up replication origin tracking in
LogicalRepSyncTableStart (similar as done for the apply worker). The
origin is advanced when first created.

* The tablesync replication origin tracking is cleaned up during
DropSubscription and/or process_syncing_tables_for_apply.

* The DropSubscription cleanup code was enhanced (v7+) to take care of
any crashed tablesync workers.

* Updates to PG docs

TODO / Known Issues:

* Address review comments

* Patch applies with whitespace warning

---

Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment

pgsql-hackers by date:

Previous
From: Amul Sul
Date:
Subject: Re: CheckpointLock needed in CreateCheckPoint()?
Next
From:
Date:
Subject: RE: Wrong statistics for size of XLOG_SWITCH during pg_waldump.