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

Allow replica identity on compressed hypertables #6897

Merged
merged 1 commit into from May 15, 2024

Conversation

JamesGuthrie
Copy link
Contributor

No description provided.

@JamesGuthrie JamesGuthrie force-pushed the jg/replident-c-ht branch 3 times, most recently from 16e69fa to 0c9d6f5 Compare May 15, 2024 06:53
@JamesGuthrie JamesGuthrie marked this pull request as ready for review May 15, 2024 06:55
Comment on lines +59 to +74
SELECT relname, relreplident FROM pg_class WHERE relname = 'test1' ORDER BY relname;
relname | relreplident
---------+--------------
test1 | f
Copy link
Contributor

Choose a reason for hiding this comment

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

Can u run it before and after changing the replica identity to make evident that it changed properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you only forgot to also run the check for the hypertable itself before changing the replica identity like you did for chunks. Other than that LGTM!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

(1 row)

-- the chunk's setting should also change to FULL
SELECT relname, relreplident FROM show_chunks('test1') ch INNER JOIN pg_class c ON (ch = c.oid) ORDER BY relname;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
SELECT relname, relreplident FROM show_chunks('test1') ch INNER JOIN pg_class c ON (ch = c.oid) ORDER BY relname;
SELECT relreplident, COUNT(*) FROM show_chunks('test1') ch INNER JOIN pg_class c ON (ch = c.oid) GROUP BY 1 ORDER BY 1;

Decrease the test output size... also be good to run it before and after change the replica identity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

This unblocks the execution of `ALTER TABLE ... REPLICA IDENTITY ...` on
hypertables with compression enabled. The configured replica identity
only propagates to tables belonging to the uncompressed hypertable.

Fixes: #6158
@JamesGuthrie JamesGuthrie merged commit c90abc2 into main May 15, 2024
33 checks passed
@JamesGuthrie JamesGuthrie deleted the jg/replident-c-ht branch May 15, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants