Background:
- In the old GPTEXT release, the lib file of gptext will be copied into $GPHOME folder and then load it when GPTEXT is running
- In the latest version of GPTEXT (as of now is 3.9.1), the gptext process will no longer copy this file, instead, it will try to locate its lib file based on Greenplum settings "dynamic_library_path".
- During the upgrade or installation stage of GPTEXT, it will change the dynamic_library_path accordingly.
This article mainly discusses the latest behavior of GPTEXT
The issue:
If we have some issue with the value of dynamic_library_path, then when running the gptext query, it will no able to locate the lib file and report the error "could not access file "gptext-x.x.x": No such file or directory"
demo=# select * from gptext.index_summary(); ERROR: could not access file "gptext-3.9.1": No such file or directory
This issue is usually caused by something wrong with the upgrade or installation, or could be dynamic_library_path was changed by mistake.
Product Version: 5.29
Workaround:
To fix this, we need correct the value of dynamic_library_path. the correct value should be similar to below, noted that the /opt/greenplum-text-3.9.1/ in the below example is $GPTXTHOME
# source /opt/greenplum-text-3.9.1/greenplum-text_path.sh ; # echo $GPTXTHOME /opt/greenplum-text-3.9.1 $ gpconfig -s dynamic_library_path Values on all segments are consistent GUC : dynamic_library_path Master value: $libdir:/opt/greenplum-text-3.9.1/lib/gpdb6 Segment value: $libdir:/opt/greenplum-text-3.9.1/lib/gpdb6
The Steps:
First, make sure all the host has this lib file available:
# gpssh -f <HOST_FILE> "ls -l <GPTEXT_HOME_FOLDER>/lib/gpdb6"
Use the below command to update the value of dynamic_library_path:
-- GPDB with version 5.x:
gpconfig -c dynamic_library_path -v '\$libdir:<GPTEXT_HOME_FOLDER>/lib/gpdb5'
-- GPDB with version 6.x:
gpconfig -c dynamic_library_path -v '$libdir:<GPTEXT_HOME_FOLDER>/lib/gpdb6'
to let the change take effect:
# gpstop -u
to verify the change:
# gpconfig -s dynamic_library_path