<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic QR: Target Apply latency metric for postgres destination with triggers in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/QR-Target-Apply-latency-metric-for-postgres-destination-with/m-p/2132302#M7866</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a QR task set up like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jon_Donker_0-1698361437168.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/118943iD8739AFCF964C71D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jon_Donker_0-1698361437168.png" alt="Jon_Donker_0-1698361437168.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As part of stress and volume testing; our question is whether Qlik’s Apply Latency metric considers the latency involved not just with the replication of the given record to the target table, but any subsequent functions that may be triggered on the target from that record being applied (eg applying to downstream_table).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our scenario is that Qlik is replicating to a Postgres target, with DB triggers attached to the replicated target tables to perform subsequent operations in other tables (tables that exist only in the target).&lt;/P&gt;
&lt;P&gt;According to postgres documentation, triggers are considered to be included within the transaction of the underlying operation that triggered it. If the trigger fails, the underlying operation that triggered it is not committed.&amp;nbsp; In this case, we’d expect that if the trigger function failed, the write that caused it would also be rolled back (resulting in Qlik reflecting an apply error).&lt;/P&gt;
&lt;P&gt;We would also then expect that the clock doesn’t stop on latency until the entire transaction has been committed in target, therefore including the trigger function in the overall latency figure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are our assumptions correct here?&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2023 23:06:32 GMT</pubDate>
    <dc:creator>Jon_Donker</dc:creator>
    <dc:date>2023-10-26T23:06:32Z</dc:date>
    <item>
      <title>QR: Target Apply latency metric for postgres destination with triggers</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/QR-Target-Apply-latency-metric-for-postgres-destination-with/m-p/2132302#M7866</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a QR task set up like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jon_Donker_0-1698361437168.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/118943iD8739AFCF964C71D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jon_Donker_0-1698361437168.png" alt="Jon_Donker_0-1698361437168.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As part of stress and volume testing; our question is whether Qlik’s Apply Latency metric considers the latency involved not just with the replication of the given record to the target table, but any subsequent functions that may be triggered on the target from that record being applied (eg applying to downstream_table).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our scenario is that Qlik is replicating to a Postgres target, with DB triggers attached to the replicated target tables to perform subsequent operations in other tables (tables that exist only in the target).&lt;/P&gt;
&lt;P&gt;According to postgres documentation, triggers are considered to be included within the transaction of the underlying operation that triggered it. If the trigger fails, the underlying operation that triggered it is not committed.&amp;nbsp; In this case, we’d expect that if the trigger function failed, the write that caused it would also be rolled back (resulting in Qlik reflecting an apply error).&lt;/P&gt;
&lt;P&gt;We would also then expect that the clock doesn’t stop on latency until the entire transaction has been committed in target, therefore including the trigger function in the overall latency figure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are our assumptions correct here?&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 23:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/QR-Target-Apply-latency-metric-for-postgres-destination-with/m-p/2132302#M7866</guid>
      <dc:creator>Jon_Donker</dc:creator>
      <dc:date>2023-10-26T23:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: QR: Target Apply latency metric for postgres destination with triggers</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/QR-Target-Apply-latency-metric-for-postgres-destination-with/m-p/2132463#M7874</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, your assumptions are correct for any relational db - triggers are part of a transaction, so the commit time on the target includes the trigger execution time, and therefor it affects the latency calculations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;boaz&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 11:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/QR-Target-Apply-latency-metric-for-postgres-destination-with/m-p/2132463#M7874</guid>
      <dc:creator>boaz_newman</dc:creator>
      <dc:date>2023-10-27T11:40:58Z</dc:date>
    </item>
  </channel>
</rss>

