What are the changes?
Adding last_received_event_on on subscriptions
A new last_received_event_on column is added to the subscriptions table. This field tracks the last date an event was received for each subscription, allowing Lago to skip idle subscriptions during daily usage computation — significantly reducing unnecessary processing.
The backfill task will:
- Populate
last_received_event_onfor all active subscriptions where it is currently NULL - Determine the last event date using your configured event store (PostgreSQL or ClickHouse)
- Process subscriptions per organization in background jobs
Fix for v1.43.0 upgrade script
Theupgrade:perform_required_jobs task has been fixed to correctly track job completion status. In v1.43.0, the script could appear to hang during the “Checking status” step — this is now resolved and the task will properly complete once all background jobs finish.
Why are we doing this?
The daily usage computation previously processed all active subscriptions, including those that hadn’t received any events recently. By tracking the last received event date, Lago can now skip idle subscriptions entirely, improving performance and reducing load.What should self-hosted users do?
Migration Steps
- Install Lago v1.44.0
- Open a shell (bash) on your API server
- Run the upgrade task:
- Backfill
last_received_event_onon all active subscriptions where it is NULL - Enqueue
BackfillLastReceivedEventOnJobper organization - Monitor progress and confirm when all records have been updated
All resources are processed in background jobs. The task will monitor progress and confirm when all records have been updated.
If you already ran this task on v1.43.0 and it appeared to hang, the jobs were still enqueued and processed. Running it again on v1.44.0 will now correctly show completion.