-
Notifications
You must be signed in to change notification settings - Fork 616
When requested, load the "citus" library first #3761
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,14 +50,7 @@ func PostgreSQLParameters(inCluster *v1beta1.PostgresCluster, outParameters *pos | |
// Exporter expects that shared_preload_libraries are installed | ||
// pg_stat_statements: https://access.crunchydata.com/documentation/pgmonitor/latest/exporter/ | ||
// pgnodemx: https://github.com/CrunchyData/pgnodemx | ||
libraries := []string{"pg_stat_statements", "pgnodemx"} | ||
|
||
defined, found := outParameters.Mandatory.Get("shared_preload_libraries") | ||
if found { | ||
libraries = append(libraries, defined) | ||
} | ||
Comment on lines
-53
to
-58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Making sure I'm following: this code here would've prepended "pg_stat_statements", "pgnodemx" to the list -- and we don't want them prepended, we want them appended, yeah? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this is a change. |
||
|
||
outParameters.Mandatory.Add("shared_preload_libraries", strings.Join(libraries, ",")) | ||
outParameters.Mandatory.AppendToList("shared_preload_libraries", "pg_stat_statements", "pgnodemx") | ||
outParameters.Mandatory.Add("pgnodemx.kdapi_path", | ||
postgres.DownwardAPIVolumeMount().MountPath) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making sure I've got this (though the test helps):
Is that a fair summation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep.
There is a set of related parameters for loading libraries that amount to
LOAD
statements at certain times.Postgres compares inodes to detect symlink chains as well.
A variety of names can refer to the same library. As I recall,
citus
,citus.so
, and a full path are acceptable. This does not handle the full path case, but in my experience that is quite unusual.Being more deliberate with these names requires parsing, which #3530 did partially. Ultimately, matching on names is still a step removed from the issue: the Citus code that complains could be in a file with any name.