I have a use case where I need to unidirectional sync between Postgres Databases so that all records of source which are not present in Destination are copied over but records present in Destination and not present in source are not removed from Destination.
I am able to implement sync using Ankane/pgsync where it makes my destination table same as source tables.
Take same tables in Destination and Source
Initial State
Source Table A:
Destination Table A:
Row 1 Row 2
First change in source
Now we add one row to Source Table A.
Source Table A:
Row 5
After running pgsync, Destination table should like
Destination Table A:
Row 1 Row 2 Row 5
Second change in source
We remove the Row 5 entry from source Table A
Source Table A:
After running pgsync, Destination table should like
Destination Table A:
Row 1 Row 2 Row 5
**Third change in source ** we add another row to Source Table A.
Source Table A:
Row 6
After running pgsync, Destination table should like
Destination Table A:
Row 1 Row 2 Row 5 Row 6