ibardarov-fms commented on issue #28458:
URL: https://github.com/apache/airflow/issues/28458#issuecomment-1357911566

   I did a brand new installation on 2.5.0 and it looks that the indexes are 
there.
   
   ```
                                                             Table 
"public.task_instance"
           Column        |            Type             | Collation | Nullable | 
   Default    | Storage  | Compression | Stats target | Description 
   
----------------------+-----------------------------+-----------+----------+---------------+----------+-------------+--------------+-------------
    task_id              | character varying(250)      |           | not null | 
              | extended |             |              | 
    dag_id               | character varying(250)      |           | not null | 
              | extended |             |              | 
    run_id               | character varying(250)      |           | not null | 
              | extended |             |              | 
    map_index            | integer                     |           | not null | 
'-1'::integer | plain    |             |              | 
    start_date           | timestamp with time zone    |           |          | 
              | plain    |             |              | 
    end_date             | timestamp with time zone    |           |          | 
              | plain    |             |              | 
    duration             | double precision            |           |          | 
              | plain    |             |              | 
    state                | character varying(20)       |           |          | 
              | extended |             |              | 
    try_number           | integer                     |           |          | 
              | plain    |             |              | 
    max_tries            | integer                     |           |          | 
'-1'::integer | plain    |             |              | 
    hostname             | character varying(1000)     |           |          | 
              | extended |             |              | 
    unixname             | character varying(1000)     |           |          | 
              | extended |             |              | 
    job_id               | integer                     |           |          | 
              | plain    |             |              | 
    pool                 | character varying(256)      |           | not null | 
              | extended |             |              | 
    pool_slots           | integer                     |           | not null | 
              | plain    |             |              | 
    queue                | character varying(256)      |           |          | 
              | extended |             |              | 
    priority_weight      | integer                     |           |          | 
              | plain    |             |              | 
    operator             | character varying(1000)     |           |          | 
              | extended |             |              | 
    queued_dttm          | timestamp with time zone    |           |          | 
              | plain    |             |              | 
    queued_by_job_id     | integer                     |           |          | 
              | plain    |             |              | 
    pid                  | integer                     |           |          | 
              | plain    |             |              | 
    executor_config      | bytea                       |           |          | 
              | extended |             |              | 
    updated_at           | timestamp with time zone    |           |          | 
              | plain    |             |              | 
    external_executor_id | character varying(250)      |           |          | 
              | extended |             |              | 
    trigger_id           | integer                     |           |          | 
              | plain    |             |              | 
    trigger_timeout      | timestamp without time zone |           |          | 
              | plain    |             |              | 
    next_method          | character varying(1000)     |           |          | 
              | extended |             |              | 
    next_kwargs          | json                        |           |          | 
              | extended |             |              | 
   Indexes:
       "task_instance_pkey" PRIMARY KEY, btree (dag_id, task_id, run_id, 
map_index)
       "ti_dag_run" btree (dag_id, run_id)
       "ti_dag_state" btree (dag_id, state)
       "ti_job_id" btree (job_id)
       "ti_pool" btree (pool, state, priority_weight)
       "ti_state" btree (state)
       "ti_state_lkp" btree (dag_id, task_id, run_id, state)
       "ti_trigger_id" btree (trigger_id)
   Foreign-key constraints:
       "task_instance_dag_run_fkey" FOREIGN KEY (dag_id, run_id) REFERENCES 
dag_run(dag_id, run_id) ON DELETE CASCADE
       "task_instance_trigger_id_fkey" FOREIGN KEY (trigger_id) REFERENCES 
trigger(id) ON DELETE CASCADE
   Referenced by:
       TABLE "rendered_task_instance_fields" CONSTRAINT "rtif_ti_fkey" FOREIGN 
KEY (dag_id, task_id, run_id, map_index) REFERENCES task_instance(dag_id, 
task_id, run_id, map_index) ON DELETE CASCADE
       TABLE "task_fail" CONSTRAINT "task_fail_ti_fkey" FOREIGN KEY (dag_id, 
task_id, run_id, map_index) REFERENCES task_instance(dag_id, task_id, run_id, 
map_index) ON DELETE CASCADE
       TABLE "task_instance_note" CONSTRAINT "task_instance_note_ti_fkey" 
FOREIGN KEY (dag_id, task_id, run_id, map_index) REFERENCES 
task_instance(dag_id, task_id, run_id, map_index) ON DELETE CASCADE
       TABLE "task_map" CONSTRAINT "task_map_task_instance_fkey" FOREIGN KEY 
(dag_id, task_id, run_id, map_index) REFERENCES task_instance(dag_id, task_id, 
run_id, map_index) ON DELETE CASCADE
       TABLE "task_reschedule" CONSTRAINT "task_reschedule_ti_fkey" FOREIGN KEY 
(dag_id, task_id, run_id, map_index) REFERENCES task_instance(dag_id, task_id, 
run_id, map_index) ON DELETE CASCADE
       TABLE "xcom" CONSTRAINT "xcom_task_instance_fkey" FOREIGN KEY (dag_id, 
task_id, run_id, map_index) REFERENCES task_instance(dag_id, task_id, run_id, 
map_index) ON DELETE CASCADE
   Access method: heap
   ```


-- 
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