Reference:
https://www.jianshu.com/p/8ff38342de87
total:
a.create extension pg_stat_statements
reported similar errors are likely to be no extensions installed
ERROR: could not open extension control file "/usr/local/pgsql/share/extension/pg_stat_statements.control": No such file or directory
b. When the source installation postgresql,
but make time and do not make world, pg will not lead to a final extension of similar pg_stat_statements
c.
the need to manually install extensions
One. Manually install postgresql extensions: such as: fuzzystrmatch, pg_stat_statements, pg_buffercache
find / -name contrib
# Find postgresql contrib directory (the directory should be data storage)
cd /data/postgresql-10.9/contrib
#
Need to make install which can be installed, which would open the directory, in the implementation of make,
Such as: installation pg_buffercache
cd pg_buffercache
make
make install