zach-overflow opened a new issue, #75966:
URL: https://github.com/apache/airflow/issues/75966

   ### Under which category would you file this issue?
   
   Airflow Core
   
   ### Apache Airflow version
   
   3.3.2
   
   ### What happened and how to reproduce it?
   
   On any Airflow 3.3.2 metadata database containing log rows older than the 
cutoff, run:
   
   ```shell
     airflow db clean \
       --tables log \
       --clean-before-timestamp '2026-10-28T00:00:00+00:00' \
       --batch-size 1 \
       --skip-archive \
       --yes \
       --verbose
   ```
   
   You can see the following per-batch output:
   1. Moving data to table `_airflow_deleted__log__...` messages, and
   2. `CREATE TABLE ... AS SELECT ...` debug SQL output. 
   
   Despite `--skip-archive` being present, each batch copies rows into a 
staging table before deleting them from log, then drops the staging table. 
Because of this, checking for archive tables after cleanup will not reveal the 
intermediate copies, and it also slows down cleanup when `skip_archives` is 
enabled.
   
   ### What you think should happen instead?
   
   With `--skip-archive`, deleting eligible rows should not create or populate 
any archive/staging tables.
   
   ### Operating System
   
   ubuntu 24.04, also MacOS 26.6.2
   
   ### Deployment
   
   _No response_
   
   ### Apache Airflow Provider(s)
   
   _No response_
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Official Helm Chart version
   
   _No response_
   
   ### Kubernetes Version
   
   _No response_
   
   ### Helm Chart configuration
   
   _No response_
   
   ### Docker Image customizations
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to