![origin download resuming origin download resuming](https://www.partitionwizard.com/images/uploads/articles/2020/12/origin-stuck-on-resuming-finalizing/origin-stuck-on-resuming-finalizing-1.png)
If that's done replication progress will persist in a crash safe manner. Additionally the LSN and commit time stamp of every source transaction can be configured on a per transaction basis using pg_replication_origin_xact_setup(). Using the replication origin infrastructure a session can be marked as replaying from a remote node (using the pg_replication_origin_session_setup() function). Naive solutions to this, such as updating a row in a table for every replayed transaction, have problems like run-time overhead and database bloat. When the applying process, or the whole cluster, dies, it needs to be possible to find out up to where data has successfully been replicated. One nontrivial part of building a replication solution is to keep track of replay progress in a safe manner. Replication origins can be created using the function pg_replication_origin_create() dropped using pg_replication_origin_drop() and seen in the pg_replication_origin system catalog. It should never be shared across systems.
![origin download resuming origin download resuming](https://cdn.gamingph.com/wp-content/uploads/2016/06/bf4-dlc1.png)
The OID is used only to avoid having to store the long version in situations where space efficiency is important.
![origin download resuming origin download resuming](https://i0.wp.com/gamingph.com/wp-content/uploads/2016/06/battlefield-4-post-download-backup-restore.png)
It should be used in a way that makes conflicts between replication origins created by different replication solutions unlikely e.g., by prefixing the replication solution's name to it. The name, which is what should be used to refer to the origin across systems, is free-form text. Replication origins have just two properties, a name and an OID.
#ORIGIN DOWNLOAD RESUMING HOW TO#
How to change replication behavior based on the origin of a row for example, to prevent loops in bi-directional replication setups How to safely keep track of replication progress