Update config.go#3555
Conversation
Another solution to the huge_pages issue here: CrunchyData#3477 A better solution would be to use what gets passed in for huge_pages and turn it off by default.
|
@David-Angel has this been tested successfully? More specifically, I'd expect you to run into issues modifying the sample conf file due read-only root file system being enabled for the For instance, simply running the additional script you provided within a running PG instance Pod results in a read-only file system error: $ kubectl exec -it hippo-instance1-kvr7-0 -c database -- bash
bash-4.4$ (
> echo "initdb fix for huge_pages."
> CSAMPLE="$(find /usr/ -type d -name 'pgsql-*')/share/postgresql.conf.sample"
> echo "$CSAMPLE"
> echo "before..."
> cat "$CSAMPLE" | grep huge
> awk -i inplace '($1 ~ /huge_pages/ || $1 ~ /#huge_pages/ || $2 ~ /huge_pagescat $CSAMPLE | grep huge/ || $2 ~ /#huge_pages/) { next } { print } END { print "huge_pages = off" }' ${CSAMPLE}
> echo "after..."
> cat "$CSAMPLE" | grep huge
> )
initdb fix for huge_pages.
/usr/pgsql-14/share/postgresql.conf.sample
before...
#huge_pages = try # on, off, or try
#huge_page_size = 0 # zero for system default
awk: inplace:47: fatal: inplace_begin: mkstemp(`/usr/pgsql-14/share/postgresql.conf.sample.gawk.wtsq08') failed (Read-only file system)
after...
#huge_pages = try # on, off, or try
#huge_page_size = 0 # zero for system default |
@andrewlecuyer It will work as this is the same fix I've made when we were using Bitnami |
|
A better solution is here: |
|
This solution did not work as the change made in the init container did not persist in the database container. This is still the best solution if approved by the Crunchydata team. |
Another solution to the huge_pages issue here:
#3477
A better solution would be to use what gets passed in for huge_pages and turn it off by default.
Checklist:
Type of Changes:
What is the current behavior (link to any open issues here)?
#3477
What is the new behavior (if this is a feature change)?
It should not break anything.
Other Information: