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

Add new extensions/plugins #294

Merged
merged 2 commits into from
Nov 3, 2023
Merged

Add new extensions/plugins #294

merged 2 commits into from
Nov 3, 2023

Conversation

TakoB222
Copy link
Contributor

Issue

The list of supported plugins was too short: https://charmhub.io/postgresql-k8s/docs/r-supported-plugins-extensions

Solution

Add new extensions/plugins:

bloom
btree_gin
btree_gist
cube
dict_int
dict_xsyn
earthdistance
fuzzystrmatch
intarray
isn
lo
ltree
old_snapshot
pg_freespacemap
pgrowlocks
pgstattuple
pg_visibility
seg
tablefunc
tcn
tsm_system_rows
tsm_system_time
uuid-ossp

Copy link
Member

@marceloneppel marceloneppel left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @TakoB222!

@dragomirp
Copy link
Contributor

Hi, @TakoB222, can you resync with main? There are some changes there that should fix the check libraries failure.

@TakoB222
Copy link
Contributor Author

Hi, @TakoB222, can you resync with main? There are some changes there that should fix the check libraries failure.

Yes, sure

src/charm.py Outdated
Comment on lines 558 to 559
if extension == "uuid_ossp":
extension = '"uuid-ossp"'
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be better to add an override mapping so in the future we can add other exceptions there.

config.yaml Outdated
plugin_uuid_ossp_enable:
default: false
type: boolean
description: Enable uuid_ossp extension
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
description: Enable uuid_ossp extension
description: Enable uuid-ossp extension

@@ -24,6 +24,35 @@
PG_TRGM_EXTENSION_STATEMENT = "SELECT word_similarity('word', 'two words');"
PLPYTHON3U_EXTENSION_STATEMENT = 'CREATE FUNCTION plpython_test() RETURNS varchar[] AS $$ return "hello" $$ LANGUAGE plpython3u;'
UNACCENT_EXTENSION_STATEMENT = "SELECT ts_lexize('unaccent','Hôtel');"
BLOOM_EXTENSION_STATEMENT = (
Copy link
Contributor

Choose a reason for hiding this comment

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

We can add those in a plugin: SQL test dictionary and then loop over .keys() in the config definition on L#192 and over .values() in the checks on L#74 and L#232.

@dragomirp
Copy link
Contributor

Added a few nitpicks. Best to do them after #281 is merged, since it touches on the same code.

@TakoB222
Copy link
Contributor Author

Okay, thanks for checking, i'll do

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for the great contribution here!
Please address Dragomir comments!

@dragomirp
Copy link
Contributor

Hi, @TakoB222, #281 was merged. Thanks for the contribution and sorry for all the speed bumps.

@dragomirp
Copy link
Contributor

Hi, @TakoB222, please sync main once more. This should sidestep the persistent failures for backup tests on CI.

config.yaml Show resolved Hide resolved
@TakoB222
Copy link
Contributor Author

TakoB222 commented Nov 2, 2023

Hi, @TakoB222, please sync main once more. This should sidestep the persistent failures for backup tests on CI.

done

@marceloneppel marceloneppel merged commit b80bca3 into canonical:main Nov 3, 2023
33 checks passed
marceloneppel pushed a commit that referenced this pull request Nov 22, 2023
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
marceloneppel pushed a commit that referenced this pull request Nov 22, 2023
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
BON4 pushed a commit to BON4/postgresql-k8s-operator that referenced this pull request May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants