This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow timescale_prometheus_extra installation without superuser
We expect most of our users to run the connector without superuser, as is best practice. This commit enables the installation of the timescale_prometheus_extra extension without using superuser, via the pgextwhlist extension. To enable this, we add an additional catalog table to the public schema, including information about the connector's installation, most importantly the schemas it's storing things in. We then use this in the extension to setup the search_path for extension creation. We need to do this since we do not want to hardcode the schemas we use, but we cannot easily reset the search path to the one set by the connector, due to the way pgextwlist runs the extension-creation scripts. This commit also makes our test code run as non-SUPERUSER wherever possible.
- Loading branch information
1 parent
9a737ae
commit d9e4f17
Showing
14 changed files
with
197 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
sed -i -e "s/#shared_preload_libraries/shared_preload_libraries/" \ | ||
/var/lib/postgresql/data/postgresql.conf \ | ||
|
||
sed -i \ | ||
-e "s/shared_preload_libraries = '/shared_preload_libraries = 'pgextwlist,/" \ | ||
/var/lib/postgresql/data/postgresql.conf | ||
|
||
echo "extwlist.extensions = 'timescale_prometheus_extra,timescaledb'" >> \ | ||
/var/lib/postgresql/data/postgresql.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.