<?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: Managed Delta table: time travel blocked after automatic VACUUM in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155422#M54240</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/113924"&gt;@vidya_kothavale&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;1. The feature is called preditive optimization for manged table.&amp;nbsp;&lt;SPAN&gt;Predictive optimization runs the following operations on Unity Catalog managed tables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- OPTIMIZE&lt;/P&gt;&lt;P&gt;- VACCUM&lt;/P&gt;&lt;P&gt;- ANALYZE&lt;BR /&gt;&lt;BR /&gt;You can read more here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/optimizations/predictive-optimization" target="_blank" rel="noopener"&gt;Predictive optimization for Unity Catalog managed tables - Azure Databricks | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. You can disable predictive optimization for a catalog or schema in following way:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/optimizations/predictive-optimization#enable-or-disable-predictive-optimization-for-a-catalog-or-schema" target="_blank" rel="noopener"&gt;Predictive optimization for Unity Catalog managed tables | Databricks on AWS&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ALTER CATALOG [catalog_name] { ENABLE | DISABLE | INHERIT } PREDICTIVE OPTIMIZATION;
ALTER { SCHEMA | DATABASE } schema_name { ENABLE | DISABLE | INHERIT } PREDICTIVE OPTIMIZATION;&lt;/LI-CODE&gt;&lt;P&gt;And if you want to increase retention period you can use following query:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ALTER TABLE table_name SET TBLPROPERTIES ('delta.deletedFileRetentionDuration' = '30 days');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;3. You can't do much since VACUUM removes all files from the table directory that are not managed by Delta, as well as data files that are no longer in the latest state of the transaction log for the table and are older than a retention threshold. Of course you can try restore deleted files using cloud provider native options.&lt;BR /&gt;For instance if you have enabled soft deletes on Azure Storage you can try to use that.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;If the answer was helpful, please consider marking it as accepted solution&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Apr 2026 07:51:47 GMT</pubDate>
    <dc:creator>szymon_dybczak</dc:creator>
    <dc:date>2026-04-24T07:51:47Z</dc:date>
    <item>
      <title>Managed Delta table: time travel blocked after automatic VACUUM</title>
      <link>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155416#M54239</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;On a managed Delta table&amp;nbsp; I get:&lt;/P&gt;&lt;PRE&gt;SELECT * FROM abc VERSION AS OF 25;&lt;/PRE&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;PRE&gt;DELTA_UNSUPPORTED_TIME_TRAVEL_BEYOND_DELETED_FILE_RETENTION_DURATION
Cannot time travel beyond delta.deletedFileRetentionDuration (168 HOURS).&lt;/PRE&gt;&lt;P&gt;Audit logs show VACUUM START/END executed by a service principal (GUID userName); I never ran VACUUM manually. Table properties don’t explicitly set delta.deletedFileRetentionDuration, and Predictive Optimization is enabled (inherited).&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What Databricks feature/job is triggering this automatic VACUUM on managed tables?&lt;/LI&gt;&lt;LI&gt;How can I override/disable this for specific tables (e.g.&amp;nbsp;increase retention or opt out)?&lt;/LI&gt;&lt;LI&gt;Once this error appears, is recovery of that old version only possible (its managed table)?&lt;BR /&gt;&lt;SPAN&gt;How should I back up a managed Delta table so I can recover older versions even after VACUUM (e.g.&amp;nbsp;copy table)?&lt;BR /&gt;Also, in my workspace only one managed table is hitting the &amp;nbsp;time‑travel error, while other tables are fine. Why would automatic VACUUM/retention affect this single table but not the others?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 24 Apr 2026 07:39:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155416#M54239</guid>
      <dc:creator>vidya_kothavale</dc:creator>
      <dc:date>2026-04-24T07:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Managed Delta table: time travel blocked after automatic VACUUM</title>
      <link>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155422#M54240</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/113924"&gt;@vidya_kothavale&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;1. The feature is called preditive optimization for manged table.&amp;nbsp;&lt;SPAN&gt;Predictive optimization runs the following operations on Unity Catalog managed tables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- OPTIMIZE&lt;/P&gt;&lt;P&gt;- VACCUM&lt;/P&gt;&lt;P&gt;- ANALYZE&lt;BR /&gt;&lt;BR /&gt;You can read more here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/optimizations/predictive-optimization" target="_blank" rel="noopener"&gt;Predictive optimization for Unity Catalog managed tables - Azure Databricks | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. You can disable predictive optimization for a catalog or schema in following way:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/optimizations/predictive-optimization#enable-or-disable-predictive-optimization-for-a-catalog-or-schema" target="_blank" rel="noopener"&gt;Predictive optimization for Unity Catalog managed tables | Databricks on AWS&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ALTER CATALOG [catalog_name] { ENABLE | DISABLE | INHERIT } PREDICTIVE OPTIMIZATION;
ALTER { SCHEMA | DATABASE } schema_name { ENABLE | DISABLE | INHERIT } PREDICTIVE OPTIMIZATION;&lt;/LI-CODE&gt;&lt;P&gt;And if you want to increase retention period you can use following query:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ALTER TABLE table_name SET TBLPROPERTIES ('delta.deletedFileRetentionDuration' = '30 days');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;3. You can't do much since VACUUM removes all files from the table directory that are not managed by Delta, as well as data files that are no longer in the latest state of the transaction log for the table and are older than a retention threshold. Of course you can try restore deleted files using cloud provider native options.&lt;BR /&gt;For instance if you have enabled soft deletes on Azure Storage you can try to use that.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;If the answer was helpful, please consider marking it as accepted solution&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2026 07:51:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155422#M54240</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2026-04-24T07:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Managed Delta table: time travel blocked after automatic VACUUM</title>
      <link>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155425#M54241</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The error &lt;STRONG&gt;DELTA_UNSUPPORTED_TIME_TRAVEL_BEYOND_DELETED_FILE_RETENTION_DURATION&lt;/STRONG&gt; confirms that the underlying files required for Version 25 have been deleted from the storage. Since the metadata knows those files should be there but finds them gone, it blocks the query.&lt;/P&gt;&lt;H3&gt;&lt;FONT size="3"&gt;1. What Databricks feature/job is triggering this automatic VACUUM on managed tables?&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;The service principal in the logs is Databricks Service executing &lt;STRONG&gt;Predictive Optimization&lt;/STRONG&gt; automatically. Predictive Optimization is the standard for Unity Catalog managed tables that automatically handles OPTIMIZE and &lt;STRONG&gt;VACUUM&lt;/STRONG&gt; operations in the background using serverless compute. It targets tables where it detects high file fragmentation or a build up of expired snapshots to maintain performance and to reduce storage costs.&lt;/P&gt;&lt;H3&gt;&lt;FONT size="3"&gt;2. How can I override/disable this for specific tables (e.g. increase retention or opt out)?&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;You can&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;Increase Retention -&lt;/STRONG&gt;&amp;nbsp;Delta keeps 7 days (168 hours) of history. You can increase it using below&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;ALTER TABLE &lt;SPAN&gt;eud_poland.staging.pibb_extract_preprocessed&lt;/SPAN&gt; 
SET TBLPROPERTIES ('delta.deletedFileRetentionDuration' = '30 days');&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Opt out -&lt;/STRONG&gt;&amp;nbsp;You can disable the service for a specific catalog or schema. More details &lt;A href="https://docs.databricks.com/aws/en/optimizations/predictive-optimization#enable-or-disable-predictive-optimization-for-a-catalog-or-schema" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You must manually manage the tables for optimizations to avoid performance degradation if you disable it.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&lt;FONT size="3"&gt;3. is recovery of that old version only possible (its managed table)?&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;No. Once VACUUM is complete and the files are deleted from the storage, the old state of the data is gone.&lt;/P&gt;&lt;H3&gt;&lt;FONT size="3"&gt;4. How should I back up a managed Delta table so I can recover older versions even after VACUUM (e.g. copy table)?&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;Time Travel is not a long-term backup solution. You can use Delta Deep Clone for long term backup&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Deep Clone -&lt;/STRONG&gt;&amp;nbsp;You can create a separate physical copy of the data and metadata.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;CREATE TABLE eud_poland.staging.pibb_extract_backup
DEEP CLONE eud_poland.staging.pibb_extract_preprocessed;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&lt;FONT size="3"&gt;5. Why is only this table affected?&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;Predictive Optimization does not hit every table with the same frequency. This specific table is targeted because:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;You are doing frequent operations on this table creating many files that trigger the optimization threshold.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Table Size/Growth&lt;/STRONG&gt;: The service prioritizes tables where storage savings or performance gains are most significant.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 24 Apr 2026 08:03:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155425#M54241</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-04-24T08:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Managed Delta table: time travel blocked after automatic VACUUM</title>
      <link>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155429#M54243</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;I&amp;nbsp; want to disbled this property on workspace level then how I can do?&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2026 09:30:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155429#M54243</guid>
      <dc:creator>vidya_kothavale</dc:creator>
      <dc:date>2026-04-24T09:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Managed Delta table: time travel blocked after automatic VACUUM</title>
      <link>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155430#M54244</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/113924"&gt;@vidya_kothavale&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can disable predictive optimization for an account, a catalog, or a schema. All Unity Catalog managed tables inherit the account value by default. You can override the account default at the catalog or schema level.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To disable it for your account to below steps:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/optimizations/predictive-optimization#enable-or-disable-predictive-optimization-for-your-account" target="_blank"&gt;Predictive optimization for Unity Catalog managed tables - Azure Databricks | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"An account admin can enable predictive optimization for all metastores in an account. Catalogs and schemas inherit this setting by default, but you can override it at either level.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Go to the accounts console.&lt;/LI&gt;&lt;LI&gt;Navigate to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Settings&lt;/STRONG&gt;, then&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Feature enablement&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Select the option you want (for example,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Enabled&lt;/STRONG&gt;) next to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Predictive optimization&lt;/STRONG&gt;."&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If the answer was helpful, please consider marking it as accepted solution&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2026 09:37:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155430#M54244</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2026-04-24T09:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Managed Delta table: time travel blocked after automatic VACUUM</title>
      <link>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155442#M54246</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If a Delta table has 10 historical versions and none of them have been modified or referenced in the last 7 days (the retention period), when VACCUM runs, does it delete all versions and their files, or does it keep the latest version and only delete older unused files?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2026 11:00:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155442#M54246</guid>
      <dc:creator>vidya_kothavale</dc:creator>
      <dc:date>2026-04-24T11:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Managed Delta table: time travel blocked after automatic VACUUM</title>
      <link>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155445#M54248</link>
      <description>&lt;P&gt;VACUUM will never delete files on the latest version even if Version 10 was not accessed or modified as it represents the current state of the table. VACUUM targets files that are not referenced by the recent version. It identifies files that were removed (due to DELETE/UPDATE etc in Versions 0 - 9) and if those specific files are not part of Version 10 and their deletion timestamp in the Log is older than the 7 day retention threshold, they are permanently deleted.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2026 11:29:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/managed-delta-table-time-travel-blocked-after-automatic-vacuum/m-p/155445#M54248</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-04-24T11:29:30Z</dc:date>
    </item>
  </channel>
</rss>

