Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
JSCHRANZ
Contributor II
Contributor II

Advanced run options with PostgreSQL source DB when restarting from previous LSN

Hi,

We are integrating Qlik Replicate with PostgreSQL as source.

Among the Advanced run options offered by Qlik Replicate, one allows recovery from a timestamp or a LSN (Log Sequence Number) position.

  1. Timestamp: in the following video Qlik Fix: How to Restart a Qlik Replicate Task from LSN for a PostgreSQL Source, it appears that the timestamp option does not work with PostgreSQL.
    Q: Is this still the case with the 2025 version of Qlik Replicate?
    Our tests have been inconclusive, but this may relate to point #2 below.

  2. LSN: the command provided to retrieve the LSN sequence (pg_current_wal_lsn) only returns the most recent sequence number acknowledged by the replication slot in PostgreSQL.
    Q: In the event of an incident requiring a rollback to an earlier point (assuming WAL logs are still available on the source database), is it possible to specify an older LSN, such as one from 24 hours prior? If so, how can this LSN be retrieved?
    During our tests, we were unable to roll back further than the most recent LSN value returned by the pg_current_wal_lsn command. When attempting to use earlier LSN values, only transactions generated after the last acknowledged position in the slot were replayed (both with and without pre-deleting the slot on DB side).

Thank you for your returns

Labels (1)
1 Solution

Accepted Solutions
john_wang
Support
Support

Hello @JSCHRANZ ,

Thanks for posting here.

Q1 – Timestamp
You are correct. The “Start Process Changes from Timestamp” run option is not supported in any version of Qlik Replicate.

Q2 – LSN
You are also correct. This behavior is specific to the PostgreSQL source endpoint. It is not possible to roll back to an earlier LSN to reread changes, even if the WAL files are still available. This is because Qlik Replicate uses the pg_logical_slot_get_changes API to capture changes, rather than pg_logical_slot_peek_changes.

Hope this helps.

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

1 Reply
john_wang
Support
Support

Hello @JSCHRANZ ,

Thanks for posting here.

Q1 – Timestamp
You are correct. The “Start Process Changes from Timestamp” run option is not supported in any version of Qlik Replicate.

Q2 – LSN
You are also correct. This behavior is specific to the PostgreSQL source endpoint. It is not possible to roll back to an earlier LSN to reread changes, even if the WAL files are still available. This is because Qlik Replicate uses the pg_logical_slot_get_changes API to capture changes, rather than pg_logical_slot_peek_changes.

Hope this helps.

John.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!