History_nodes not deleted after upgrade from 1.16.2 to 1.18.5

Hello, I performed a temporal upgrade from 1.16 to 1.18.5 in order to have history_nodes cleanup as the history cleanup for postgres was released on 1.18.2.

However, the history_node table already had ~31k rows before the upgrade. and the number of rows after 2 days is still around ~31k rows.

So my question is will the history cleanup implementation clean all the history after the retention period of 3 days? or will it only clean up history for newer workflows( workflows created after the upgrade to 1.18.5 )?

Another question: is there a way to check how old a history node is? or to what workflow it belongs?


My understanding is that scavenger cleanup would be performed on all executions that are past retention.
cc @yux

Hi, currently 1.18.5 is disabled this feature by default. You need to update the dynamic config

worker.historyScannerVerifyRetention = true

to enable this feature.

Thanks. That makes sense.