timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
16.8k stars 852 forks source link

Backport to 2.15.x: #7061: Fix handling for multiple unique index in compressed INSERT #7067

Closed timescale-automation closed 6 days ago

timescale-automation commented 6 days ago

This is an automated backport of #7061: Fix handling for multiple unique index in compressed INSERT. This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.

For more details, please see the documentation

Original description

Fix handling for multiple unique index in compressed INSERT

Adjust compressed_insert_key_columns to correctly handle multiple unique indexes. This patch changes the function to no longer combine the columns from multiple indexes but instead only return intersecting columns from all the unique indexes. This patch also fixes a couple comments in that function.

Disable-check: commit-count