Giter VIP home page Giter VIP logo

Comments (4)

cobolbaby avatar cobolbaby commented on August 17, 2024

Fixed by cmake -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/${PG_MAJOR}/server ..

from pg_jieba.

cobolbaby avatar cobolbaby commented on August 17, 2024

While the compilation and installation phases went smoothly, the pg_upgrade operation encounters an issue, stating that it cannot find the specified plugin.

dev@kubernetes-4 16:28:12 CST ~$ PGDATA_DEFAULT_TABLESPACE=/data/hdd/pg
dev@kubernetes-4 16:28:12 CST ~$ PGDATA_SECONDARY_TABLESPACE=/data/ssd/pg
dev@kubernetes-4 16:28:12 CST ~$ docker run --rm \
> -e POSTGRES_INITDB_ARGS="--data-checksums" \
> -v ${PGDATA_DEFAULT_TABLESPACE}:/var/lib/postgresql \
> -v ${PGDATA_SECONDARY_TABLESPACE}:/data/postgresql \
> registry.inventec/infra/pg_upgrade:12-to-16.2 \
> --check
Performing Consistency Checks
-----------------------------
Checking cluster versions                                     ok

Checking database user is the install user                    ok
Checking database connection settings                         ok
Checking for prepared transactions                            ok
Checking for system-defined composite types in user tables    ok
Checking for reg* data types in user tables                   ok
Checking for contrib/isn with bigint-passing mismatch         ok
Checking for incompatible "aclitem" data type in user tables  ok
Checking for user-defined encoding conversions                ok
Checking for user-defined postfix operators                   ok
Checking for incompatible polymorphic functions               ok
Checking for presence of required libraries                   ok
Checking database user is the install user                    ok
Checking for prepared transactions                            ok
Checking for new cluster tablespace directories               ok

*Clusters are compatible*
dev@kubernetes-4 16:51:34 CST ~$ docker run --rm -e POSTGRES_INITDB_ARGS="--data-checksums" -v ${PGDATA_DEFAULT_TABLESPACE}:/var/lib/postgresql -v ${PGDATA_SECONDARY_TABLESPACE}:/data/postgresql registry.inventec/infra/pg_upgrade:12-to-16.2 --link

Performing Consistency Checks
-----------------------------
Checking cluster versions                                     ok
Checking database user is the install user                    ok
Checking database connection settings                         ok
Checking for prepared transactions                            ok
Checking for system-defined composite types in user tables    ok
Checking for reg* data types in user tables                   ok
Checking for contrib/isn with bigint-passing mismatch         ok
Checking for incompatible "aclitem" data type in user tables  ok
Checking for user-defined encoding conversions                ok
Checking for user-defined postfix operators                   ok
Checking for incompatible polymorphic functions               ok
Creating dump of global objects                               ok
Creating dump of database schemas                             
*failure*

Consult the last few lines of "/var/lib/postgresql/16/data/pg_upgrade_output.d/20240218T085024.257/log/pg_upgrade_dump_16476.log" for
the probable cause of the failure.
Failure, exiting
dev@kubernetes-4 16:51:34 CST ~$ 
dev@kubernetes-4 16:51:34 CST ~$ sudo cat ${PGDATA_DEFAULT_TABLESPACE}/16/data/pg_upgrade_output.d/20240218T085024.257/log/pg_upgrade_dump_16476.log
[sudo] password for dev: 
command: "/usr/lib/postgresql/16/bin/pg_dump" --host /var/lib/postgresql --port 50432 --username postgres --schema-only --quote-all-identifiers --binary-upgrade --format=custom  --file="/var/lib/postgresql/16/data/pg_upgrade_output.d/20240218T085024.257/dump/pg_upgrade_dump_16476.custom" 'dbname=F3_BDC_test' >> "/var/lib/postgresql/16/data/pg_upgrade_output.d/20240218T085024.257/log/pg_upgrade_dump_16476.log" 2>&1
pg_dump: error: query failed: ERROR:  could not access file "$libdir/pg_jieba": No such file or directory
pg_dump: detail: Query was: SELECT
  ( SELECT alias FROM pg_catalog.ts_token_type('8749831'::pg_catalog.oid) AS t
    WHERE t.tokid = m.maptokentype ) AS tokenname,
  m.mapdict::pg_catalog.regdictionary AS dictname
FROM pg_catalog.pg_ts_config_map AS m
WHERE m.mapcfg = '8749835'
ORDER BY m.mapcfg, m.maptokentype, m.mapseqno

dev@kubernetes-2 19:07:46 CST ~$ docker run --rm -ti --name pgtest --entrypoint=/bin/bash registry.inventec/infra/pg_upgrade:12-to-16.2
postgres@df54efbb4da7:/var/lib/postgresql$ find / -type f -name "*jieba*"
find: ‘/var/cache/ldconfig’: Permission denied
find: ‘/var/cache/apt/archives/partial’: Permission denied
find: ‘/etc/ssl/private’: Permission denied
find: ‘/proc/tty/driver’: Permission denied
find: ‘/root’: Permission denied
/usr/share/postgresql/16/extension/pg_jieba.control
/usr/share/postgresql/16/extension/pg_jieba--1.1.1.sql
/usr/share/postgresql/16/tsearch_data/jieba.idf
/usr/share/postgresql/16/tsearch_data/jieba_hmm.model
/usr/share/postgresql/16/tsearch_data/jieba_base.dict
/usr/share/postgresql/16/tsearch_data/jieba_user.dict
/usr/share/postgresql/16/tsearch_data/jieba.stop
/usr/lib/postgresql/16/lib/pg_jieba.so
find: ‘/raft/datadir’: Permission denied
postgres@df54efbb4da7:/var/lib/postgresql$ 

from pg_jieba.

cobolbaby avatar cobolbaby commented on August 17, 2024

@jaiminpan Could you please help fix this bug?

from pg_jieba.

jaiminpan avatar jaiminpan commented on August 17, 2024

Thanks for the suggestion, it would be appreciated if you could submit a patch.

from pg_jieba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.