Create partition error - HINT: If the column does not currently contain nulls, advance the AHM

StackOverflow https://stackoverflow.com//questions/22005289

  •  21-12-2019
  •  | 
  •  

Question

I am trying to partition my existing table by year.(there are no existing partions)

alter table test_table PARTITION BY EXTRACT (year FROM date_c);

But there seems to be some error

ROLLBACK 2628: Column "date_c" in PARTITION BY expression is not allowed, since it contains NULL values **HINT: If the column does not currently contain nulls, advance the AHM and purge the nulls from the delete vectors before altering the partitioning**

The column does not have any null value so followed the hint. I did advance AHM to now. But how to purge the nulls from delete vectors?

Was it helpful?

Solution

After setting the AHM (Ancient History Marker) to the greatest allowable value, you can use PURGE_TABLE() to permanently remove delete data from physical storage.

The MAKE_AHM_NOW() function advances the epoch and performs a moveout operation on all projections. The AHM is then set to LGE (Last Good Epoch). At this point, any historical data (including delete vectors) will be lost and rollbacks are not possible. It does not automatically purge old data.

OTHER TIPS

Looks like I have to purge data after setting AHM to now() (I assumed setting AHM to now() automatically takes care of purging older data).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top