<?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 Re: Replication Slot size increasing rapidly for postgresql in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422669#M9736</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/243606"&gt;@gayatri235&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm assuming you are meaning the WAL size (rather than slot size). Besides&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/125525"&gt;@DesmondWOO&lt;/a&gt;&amp;nbsp;comments:&lt;/P&gt;
&lt;P&gt;While using the PostgreSQL Logical Replication Slots, we must be careful enough at the WAL file size as an orphaned slot, or inactive slot, or a slow slot cannot reply the WAL fast enough, or other slot exceptions may lead the WAL files size increasing and impacts the whole PostgreSQL database. So monitor the WAL files sizes and the storage spaces is important for the DBA.&lt;BR /&gt;&lt;A title="Here are a few limitations of PostgreSQL Replication Slots" href="https://hevodata.com/learn/postgresql-replication-slots/#:~:text=as%20the%20Source.-,Limitations%20of%20PostgreSQL%20Replication%20Slots,without%20manual%20settings%2C%20pg_wal%20directory%20space%20needs%20to%20be%20manually%20monitored.,-Conclusion" target="_blank" rel="noopener nofollow noreferrer"&gt;Here are a few limitations of PostgreSQL Replication Slots&lt;/A&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Orphaned Replication Slot: The WAL files are retained by the master when the replica disconnects. This also means that the pg_wal directory may run out of space. Imagine a scenario where the replica fails forever and cannot be recovered (an orphaned replication slot), or when a replica cannot replay the WAL segments fast enough.&lt;/LI&gt;
&lt;LI&gt;Manually Monitoring pg_wal Directory: The WAL files will just pile up. So you need to monitor the slots and manually drop them. Only when you do that will the master delete anything from the pg_wal directory. You will see how you can monitor and drop replication slots later. So while WAL retention is taken care of without manual settings, pg_wal directory space needs to be manually monitored.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Some suggestions to avoid the storage spaces issues:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 1. Allocate reasonable free spaces for WAL files, depends on the peak transactions volume size of the system&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 2. Enable the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="WAL heartbeat" href="https://help.qlik.com/en-US/replicate/November2023/Content/Replicate/Main/PostgreSQL/advanced_prop_postgresql_source.htm#ar_postgresds_802412600_1389284:~:text=WAL%20heartbeat%20%2D%20An,slot%E2%80%99s%20LSN%20position." target="_blank" rel="noopener nofollow noreferrer"&gt;WAL heartbeat&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the PostgreSQL source endpoint&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_0-1708655168792.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/160495i58A078E2F01F09AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1708655168792.png" alt="john_wang_0-1708655168792.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; 3.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Limit the size of a slot in PostgreSQL" href="https://repost.aws/knowledge-center/dms-high-storage-consumption-postgresql#:~:text=Limit%20the%20size,the%20task%20fails." target="_blank" rel="noopener nofollow noreferrer"&gt;Limit the size of a slot in PostgreSQL&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(You can apply max_slot_wal_keep_size on the source database in PostgreSQL 13 and later) (&lt;SPAN&gt;&amp;nbsp;AWS Database Migration Service (AWS DMS)&amp;nbsp;is OEM of Qlik Replicate).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 4. Delete the useless slot(s). Stop the Qlik Replicate task will not drop the slot, the slot should be dropped by the DBA.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;BTW, if the slot is dropped to free up the spaces, then the slot should be created again. All the data changes during the previous task failure to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM class="Highlight ht3ec7d61a-4558-4809-bebc-3c5e0889f80a"&gt;new&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;slot creation cannot be captured anymore. The task should be reload and start capture changes from the slot creation time.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;BR /&gt;John.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2024 02:27:04 GMT</pubDate>
    <dc:creator>john_wang</dc:creator>
    <dc:date>2024-02-23T02:27:04Z</dc:date>
    <item>
      <title>Replication Slot size increasing rapidly for postgresql</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422551#M9732</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;So here is the scenario,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have created Full Load and Apply Changes task for source POSTGRESQL and target SYNAPSE.&lt;/P&gt;
&lt;P&gt;Task was running smoothly, but suddenly the replication slot started to grew in GBs/min.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;checked logs at verbose level,&lt;/P&gt;
&lt;P&gt;I saw this "wal_table_filter_reptask(...) Table tablename does not match task's capture pattern" .&lt;/P&gt;
&lt;P&gt;the tablename mentioned above is not there in the selected table for replication, why is this table present in the logs ?&lt;/P&gt;
&lt;P&gt;What is causing the latency or replication slot growth&amp;nbsp; ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions what parameter needs to be checked at source and target end&amp;nbsp; ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 19:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422551#M9732</guid>
      <dc:creator>gayatri235</dc:creator>
      <dc:date>2024-02-22T19:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Replication Slot size increasing rapidly for postgresql</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422662#M9733</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/243606"&gt;@gayatri235&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to the Qlik Community.&lt;BR /&gt;&lt;BR /&gt;"wal_table_filter_reptask(...) Table tablename does not match task's capture pattern", this message should be printed when verbose logging is enabled.&amp;nbsp;This means that Replicate can capture events for this table, but is naturally ignoring them because this table is not in your captured list.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Desmond&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 01:32:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422662#M9733</guid>
      <dc:creator>DesmondWOO</dc:creator>
      <dc:date>2024-02-23T01:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Replication Slot size increasing rapidly for postgresql</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422665#M9735</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/243606"&gt;@gayatri235&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Regarding "&lt;SPAN&gt;Replication Slot size increasing rapidly",&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;please check whether there is a maintenance job which generates a lot of changes&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;on the Replicate console, please check "Incoming Changes Details" to see whether changes are queued on Disk, as it may indicate a performance issue. If a slot is not advanced quickly enough, the disk space it uses (slot size) could continue to increase.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;To comprehend the events that have occurred in your environment, we need to examine your task log. Should the issue continue to persist, I would suggest to submit a support ticket.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Regards.&lt;BR /&gt;Desmond&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 02:02:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422665#M9735</guid>
      <dc:creator>DesmondWOO</dc:creator>
      <dc:date>2024-02-23T02:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Replication Slot size increasing rapidly for postgresql</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422669#M9736</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/243606"&gt;@gayatri235&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm assuming you are meaning the WAL size (rather than slot size). Besides&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/125525"&gt;@DesmondWOO&lt;/a&gt;&amp;nbsp;comments:&lt;/P&gt;
&lt;P&gt;While using the PostgreSQL Logical Replication Slots, we must be careful enough at the WAL file size as an orphaned slot, or inactive slot, or a slow slot cannot reply the WAL fast enough, or other slot exceptions may lead the WAL files size increasing and impacts the whole PostgreSQL database. So monitor the WAL files sizes and the storage spaces is important for the DBA.&lt;BR /&gt;&lt;A title="Here are a few limitations of PostgreSQL Replication Slots" href="https://hevodata.com/learn/postgresql-replication-slots/#:~:text=as%20the%20Source.-,Limitations%20of%20PostgreSQL%20Replication%20Slots,without%20manual%20settings%2C%20pg_wal%20directory%20space%20needs%20to%20be%20manually%20monitored.,-Conclusion" target="_blank" rel="noopener nofollow noreferrer"&gt;Here are a few limitations of PostgreSQL Replication Slots&lt;/A&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Orphaned Replication Slot: The WAL files are retained by the master when the replica disconnects. This also means that the pg_wal directory may run out of space. Imagine a scenario where the replica fails forever and cannot be recovered (an orphaned replication slot), or when a replica cannot replay the WAL segments fast enough.&lt;/LI&gt;
&lt;LI&gt;Manually Monitoring pg_wal Directory: The WAL files will just pile up. So you need to monitor the slots and manually drop them. Only when you do that will the master delete anything from the pg_wal directory. You will see how you can monitor and drop replication slots later. So while WAL retention is taken care of without manual settings, pg_wal directory space needs to be manually monitored.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Some suggestions to avoid the storage spaces issues:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 1. Allocate reasonable free spaces for WAL files, depends on the peak transactions volume size of the system&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 2. Enable the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="WAL heartbeat" href="https://help.qlik.com/en-US/replicate/November2023/Content/Replicate/Main/PostgreSQL/advanced_prop_postgresql_source.htm#ar_postgresds_802412600_1389284:~:text=WAL%20heartbeat%20%2D%20An,slot%E2%80%99s%20LSN%20position." target="_blank" rel="noopener nofollow noreferrer"&gt;WAL heartbeat&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the PostgreSQL source endpoint&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_0-1708655168792.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/160495i58A078E2F01F09AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1708655168792.png" alt="john_wang_0-1708655168792.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; 3.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="Limit the size of a slot in PostgreSQL" href="https://repost.aws/knowledge-center/dms-high-storage-consumption-postgresql#:~:text=Limit%20the%20size,the%20task%20fails." target="_blank" rel="noopener nofollow noreferrer"&gt;Limit the size of a slot in PostgreSQL&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(You can apply max_slot_wal_keep_size on the source database in PostgreSQL 13 and later) (&lt;SPAN&gt;&amp;nbsp;AWS Database Migration Service (AWS DMS)&amp;nbsp;is OEM of Qlik Replicate).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 4. Delete the useless slot(s). Stop the Qlik Replicate task will not drop the slot, the slot should be dropped by the DBA.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;BTW, if the slot is dropped to free up the spaces, then the slot should be created again. All the data changes during the previous task failure to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM class="Highlight ht3ec7d61a-4558-4809-bebc-3c5e0889f80a"&gt;new&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;slot creation cannot be captured anymore. The task should be reload and start capture changes from the slot creation time.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;BR /&gt;John.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 02:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2422669#M9736</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-02-23T02:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Replication Slot size increasing rapidly for postgresql</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2423283#M9784</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If our response has been helpful, please consider clicking "Accept as Solution". This will assist other users in easily finding the answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Sushil Kumar&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 06:00:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Replication-Slot-size-increasing-rapidly-for-postgresql/m-p/2423283#M9784</guid>
      <dc:creator>SushilKumar</dc:creator>
      <dc:date>2024-02-26T06:00:49Z</dc:date>
    </item>
  </channel>
</rss>

