Skip to content
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

What is this error? #8

Open
kathynguyen333 opened this issue May 2, 2020 · 9 comments
Open

What is this error? #8

kathynguyen333 opened this issue May 2, 2020 · 9 comments

Comments

@kathynguyen333
Copy link

kathynguyen333 commented May 2, 2020

root@devil:/var/www/html/pg-spgist_hamming-master/bktree# sudo make installcheck/usr/lib/postgresql/11/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/usr/lib/postgresql/11/bin'    --dbname=contrib_regression init utilities test_1 test_2 int8
(using postmaster on Unix socket, default port)
============== dropping database "contrib_regression" ==============
NOTICE:  database "contrib_regression" does not exist, skipping
DROP DATABASE
============== creating database "contrib_regression" ==============
ERROR:  permission denied to create database
command failed: "/usr/lib/postgresql/11/bin/psql" -X -c "CREATE DATABASE \"contrib_regression\" TEMPLATE=template0" "postgres"
/usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk:403: recipe for target 'installcheck' failed
make: *** [installcheck] Error 2

@fake-name
Copy link
Owner

Installcheck is failing because the user you're authenticating to on postgresql can't create databases. You have a permissions issue.

Also, I think your error text has a few missing newlines?

Technically, you don't need to run sudo make installcheck, it only checks you installed everything correctly.

@kathynguyen333
Copy link
Author

kathynguyen333 commented May 2, 2020

Tks! i try

root@devil:/var/www/html/pg-spgist_hamming-master/bktree# sudo make install
/bin/mkdir -p '/usr/lib/postgresql/11/lib'
/bin/mkdir -p '/usr/share/postgresql/11/extension'
/bin/mkdir -p '/usr/share/postgresql/11/extension'
/usr/bin/install -c -m 755  bktree.so '/usr/lib/postgresql/11/lib/bktree.so'
/usr/bin/install -c -m 644 .//bktree.control '/usr/share/postgresql/11/extension/'
/usr/bin/install -c -m 644 .//bktree--1.0.sql  '/usr/share/postgresql/11/extension/'
/bin/mkdir -p '/usr/lib/postgresql/11/lib/bitcode/bktree'
/bin/mkdir -p '/usr/lib/postgresql/11/lib/bitcode'/bktree/
/usr/bin/install -c -m 644 bktree.bc '/usr/lib/postgresql/11/lib/bitcode'/bktree/./
/usr/bin/install -c -m 644 bktree_utils.bc '/usr/lib/postgresql/11/lib/bitcode'/bktree/./
cd '/usr/lib/postgresql/11/lib/bitcode' && /usr/lib/llvm-6.0/bin/llvm-lto -thinlto -thinlto-action=thinlink -o bktree.index.bc bktree/bktree.bc bktree/bktree_utils.bc

These are not errors, right ?

@fake-name
Copy link
Owner

That just looks like the normal install process.

Also, please use proper formatting for code blocks.

@kathynguyen333
Copy link
Author

Sorry, this is my first commit on github . thank you very much . But I have a question . Does this program need a strong system? My VPS only 2core and 4gb

@fake-name
Copy link
Owner

It's not a program? It's a postgres extension, and it entirely depends on the number if hashes you're trying to index, and your tolerance for query time..

@aigupta
Copy link

aigupta commented Aug 12, 2021

Hey @fake-name , I am facing the same issue as @kathynguyen333 . but after all the steps when start the postgres and create the extension, it is saying Operator<--> already exists. and when I try to drop the extension, it says extension does not exist.
postgres=# DROP EXTENSION bktree; ERROR: extension "bktree" does not exist postgres=# CREATE EXTENSION bktree; ERROR: operator <-> already exists

@fake-name
Copy link
Owner

@aigupta - You're running into a completely different issue.

From the look of it, something is already providing the <-> operator. I know the pg_trgm extension also uses that, so if you have it enabled, it will break spgist_hamming.

@Zer0-
Copy link

Zer0- commented Aug 31, 2021

@fake-name

I know the pg_trgm extension also uses that, so if you have it enabled, it will break spgist_hamming.

This might be a problem in the future for me. Is it relatively simple to redefine the symbol your extension uses for the operator and recompile?

@fake-name
Copy link
Owner

This might be a problem in the future for me. Is it relatively simple to redefine the symbol your extension uses for the operator and recompile?

I believe you just have to change https://github.com/fake-name/pg-spgist_hamming/blob/master/bktree/bktree--1.0.sql#L81 before installing the extension.

The overload of <-> is basically so you can verify the in-db hamming distance calculation matches the out-of-db one (and so I could test it). It's not actually used in the normal course of the index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants