Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Defining Logical Decoding Between 2 PostgreSQL Servers

$
0
0

I attempted to ask for clarification on another post, but since this is my first post, I wasn't able to add a comment to the question:

Need a log based replication / CDC solution to publish postgres to oracle subscribers

I've been struggling with creating the process for Logical Decoding to replicate data from one 9.5.4 PostgreSQL server to another. I believe I have the majority of the steps completed, and as long as I did those steps on the correct server, I'm (hopefully) missing only 1 critical step. Here is an overview of the steps I have completed:

  1. SOURCE & TARGET - Changed the postgresql.conf file to support Logical Decoding (wal_level=logical; max_replication_slots=3; max_wal_senders=3)
  2. SOURCE - Created the replication slot - SELECT pg_create_logical_replication_slot('wendy_test', 'test_decoding')
  3. This next step is the part that I'm unsure of. TARGET - Using cmd, I'm executing a similar command (to hide sensitive info):
pg_recvlogical --start --slot=wendy_test --plugin=test_decoding --dbname=rateit --file=C:\AWS_Backups\Logical_Decoding\Logical_Decoding_Test.log --username=dbaadmin --host=127.##.##.### --port=5432

**Where --host=127.##.##.### is the SOURCE **When I execute the above command, I never receive a cursor again. It just keeps going and going until I hit Ctl+C (maybe that's by design?)

  1. SOURCE - Created a test table (SOURCE and TARGET) and INSERTed rows into the SOURCE table, to perform a test of the replication slot
  2. SOURCE - Made sure the INSERTed rows were queued for replication/consumption on the SOURCE server using pg_logical_slot_changes('wendy_test', null, null, 'include_xids', '0'); however, none of the changes ever made it to the TARGET databse/test_ld table

I'm obviously not doing something correctly. Could someone please help me figure what step I did incorrectly, or skipped? My PostgreSQL experience is limited, so even if you think it's the simplest over-looked item, please let me know how I can make this right.

I appreciate your help and your time.

Wendy


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>