Failed queries in Postgres Logs
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 472
Description
### Under which category would you file this issue?
Airflow Core
### Apache Airflow version
3.3.0
### What happened and how to reproduce it?
I run airflow under docker. When I docker-logs my postgres container I see the following error message repeated every second:
```
2026-08-24 03:15:04.534 UTC [888555] STATEMENT: SELECT count(*) AS count_1
FROM (SELECT base.*
FROM task_reschedule AS base
WHERE base.start_date < '2026-08-09T05:15:00+02:00'::timestamptz AND base.dag_id IN ('my', 'dag', 'ids', 'go', 'here')) AS anon_1
2026-08-24 03:15:10.822 UTC [888573] ERROR: column base.dag_id does not exist at character 145
2026-08-24 03:15:10.822 UTC [888573] HINT: Perhaps you meant to reference the column "base.dagrun_id".
```
Not sure which part of airflow generates this query what is the impact of this, but seems like a schema error. I though it is worth reporting.
### What you think should happen instead?
_No response_
### Operating System
_No response_
### Deployment
Docker-Compose
### Apache Airflow Provider(s)
_No response_
### Versions of Apache Airflow Providers
_No response_
### Official Helm Chart version
Not Applicable
### Kubernetes Version
_No response_
### Helm Chart configuration
_No response_
### Docker Image customizations
Nothing special
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] 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)
Contributor guide
Research direction
Start by reproducing the repeated query failure with the reported Docker Compose setup and inspect the task_reschedule table schema and related migration history. Trace which Airflow operation issues the query, then verify that the schema and query agree and that the repeated PostgreSQL error is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, postgresql, python
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100