Description
Connector Name
destination-postgres
Connector Version
2.4.4
What step the error happened?
Other
Relevant information
All postgres airbyte internal tables are being overindexed. This overindexing is A) unnecessary B) wastes disk space.
I am seeing four indexes being created on these tables:
<stream_name>_airbyte_tmp_extracted_at USING btree (_airbyte_extracted_at)
<stream_name>_airbyte_tmp_loaded_at USING btree (_airbyte_loaded_at, _airbyte_extracted_at)
<stream_name>_airbyte_tmp_pkey USING btree (_airbyte_raw_id)
<stream_name>_airbyte_tmp_raw_id USING btree (_airbyte_raw_id)
The _pkey and _raw_id are indexing on the same column.
SELECT
c.relname,
(pg_stat_file(pg_relation_filepath(c.oid))).modification AS file_mtime
FROM pg_class c
WHERE c.relkind = 'i'
AND (c.relname iLIKE '%_raw_id'
or c.relname iLIKE '%_pkey')
order by 2 desc
For our instance shows that both indexes are being actively generated so neither appears to be remnant indexes from an earlier postgres version.
Our database monitoring tool is indicating over 700 duplicate indexes for our moderate deployment of Airbyte.
Recommended solution:
I think either index can be dropped.
If pkey was intended for use with a Dedupe sync, then the index creation is not correctly doing that.
Relevant log output
Contribute
- Yes, I want to contribute