Skip to content

airflow db export-archived doesn't page results #51156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
dominikkedziak opened this issue May 28, 2025 · 1 comment
Open
1 of 2 tasks

airflow db export-archived doesn't page results #51156

dominikkedziak opened this issue May 28, 2025 · 1 comment
Labels
area:CLI area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet

Comments

@dominikkedziak
Copy link

Apache Airflow version

3.0.1

If "Other Airflow 2 version" selected, which one?

All 2.x

What happened?

While using airflow db export-archived command it fetches all the results at once instead of paging them.

In case of big instances and archiving a lot of data a lot of memory is needed to use this command, othervise it ends up with OOMErrors

Exact line:
https://github.com/apache/airflow/blob/3.0.1/airflow-core/src/airflow/utils/db_cleanup.py#L163

What you think should happen instead?

use server-side cursor for paging if available.

How to reproduce

Create a database that has tables with the size bigger than your memory and then try to archive data with use of
airflow db export-archived command.

Operating System

K8s - pods with Ubuntu

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@dominikkedziak dominikkedziak added kind:bug This is a clearly a bug area:core needs-triage label for new issues that we didn't triage yet labels May 28, 2025
Copy link

boring-cyborg bot commented May 28, 2025

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@dosubot dosubot bot added the area:CLI label May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CLI area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet
Projects
None yet
Development

No branches or pull requests

1 participant