Wanted to understand the working of start_lsn and write_lsn #1488
Unanswered
PhantomHunt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are performing a bulk operation and wanted to start replication from the last position of the transaction which we had read earlier. Eg. we had inserted 1000 records in bulk and started reading replication till 500 position in first iteration and from the second iteration we wanted replication to give data from 501 position. We used the start_lsn parameter in start_replication() but it is starting from the the begin of the transaction.
i.e. From Begin till Commit of transaction. We even tried giving msg.data_start value in start_lsn but still the behaviour remains same.
Here is the code snippet for reference which we have used:
cur.start_replication(slot_name='emp_tab_slot', start_lsn=5435885099080, decode=False, options=options, status_interval=1)
Is there any way in which we can start reading the wal log from the defined position, rather than reading from the begin.
We had also tried the write_lsn attribute with the msg.cursor.send_feedback() which is also not working as expected it is also giving response from the beginning.
Beta Was this translation helpful? Give feedback.
All reactions