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

Force use of lz4 for TOAST compression #81

Open
frost242 opened this issue Nov 27, 2024 · 1 comment
Open

Force use of lz4 for TOAST compression #81

frost242 opened this issue Nov 27, 2024 · 1 comment

Comments

@frost242
Copy link
Contributor

Hello,

Earlier with v4, I experimented with default_toast_compression. There's a significant improvement in table size when using lz4 instead of pglz. It may be a good idea to advise to set default_toast_compression to lz4 before installing the PoWA repository, or maybe force lz4 in the extension, when available.

Do you want me to try to submit a patch to force lz4 compression ?

Kind regards

@rjuju
Copy link
Member

rjuju commented Dec 9, 2024

hi,

sorry I forgot to answer. I agree that it's likely a good idea, but there are some caveat:

  • as you mentioned it's not available in all major versions, so simply forcing it when possible means that if you pg_upgrade from an older version you will never be able to use it
  • it's likely that eventually other compression methods will be available for TOAST so forcing it when possible could then become problematic

I think that we should provide a real SQL API to handle that (a function that changes the TOAST compression on all powa related tables) and store the information somewhere (so that we can distinguish explicit lz4 vs default lz4), and eventually a way to use those from the UI.

once we have all of that forcing the default at install time could be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants