Skip to content

Commit

Permalink
Add --no-lib flag to not load citus shared library
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteF committed Feb 23, 2024
1 parent 5339836 commit 12875fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions citus_dev/citus_dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""citus_dev
Usage:
citus_dev make <name> [--size=<count>] [--port=<port>] [--use-ssl] [--no-extension] [--destroy] [--init-with=<sql_file>] [--init-worker-with=<sql_file>] [--with-pgbouncer] [--fsync]
citus_dev make <name> [--size=<count>] [--port=<port>] [--use-ssl] [--no-extension] [--no-lib] [--destroy] [--init-with=<sql_file>] [--init-worker-with=<sql_file>] [--with-pgbouncer] [--fsync]
citus_dev restart <name> [--watch] [--port=<port>]
citus_dev (start|stop) <name> [--port=<port>] [--force]
Expand All @@ -12,6 +12,7 @@ Options:
--watch Watch for changes to the citus plugin and restart the cluster when the plugin updates
--use-ssl Create the cluster with ssl enabled
--no-extension Do not create the extension while creating the nodes
--no-lib Do not put citus in shared_preload_libraries
--destroy Destroy any old cluster with the same name
--init-with=<sql_file> A SQL script to run after creation of the cluster to set up any necessary tables and data
--init-worker-with=<sql_file> A SQL script to run after creation of the cluster on the workers
Expand Down Expand Up @@ -55,7 +56,10 @@ def createNodeCommands(clustername, role, arguments, index=None):
else:
run(f"initdb -D {clustername}/{nodename}")

shared_preload_libraries = ['citus', 'pg_stat_statements']
if arguments['--no-lib']:
shared_preload_libraries = ['pg_stat_statements']
else:
shared_preload_libraries = ['citus', 'pg_stat_statements']

shared_preload_libraries = ','.join(shared_preload_libraries)

Expand Down

0 comments on commit 12875fb

Please sign in to comment.