Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 282: Fix check of NOT NULL by repack.primary_keys #376

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

za-arthur
Copy link
Collaborator

PostgreSQL 11 introduced covering indexes. pg_repack couldn't use indexes which include additional columns because all columns are listed in pg_index.indkey. To overcome this it is necessary to consider pg_index.indnkeyatts value.

In lib/pg_repack.sql.in I had to define two versions of repack.primary_keys since pg_index.indnkeyatts was added only in PostgreSQL 11. Otherwise it would be necessary to drop support of PostgreSQL 10 and below.

Issue: #282

PostgreSQL 11 introduced covering indexes. pg_repack couldn't
use indexes which include additional columns because all
columns are listed in `pg_index.indkey`. To overcome this
it is necessary to consider `pg_index.indnkeyatts` value.
@za-arthur za-arthur added the bug label Dec 14, 2023
Copy link
Collaborator

@andreasscherbaum andreasscherbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@andreasscherbaum
Copy link
Collaborator

I like that you keep older versions supported.

@za-arthur za-arthur merged commit 6a3c282 into master Feb 28, 2024
18 checks passed
@za-arthur za-arthur deleted the issue_282_covering_index branch February 28, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants