epam / epam/Indigo

Bingo 1.8x PostgreSQL install bug

Open
#137 2 comments 0 reactions 1 assignee Claimed by @mkviatkovskii View on GitHub
Bingo Priority: Medium
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

I have identified two bugs in the latest PostgreSQL version of Bingo (1.8.0beta.r1). All the testing was performed on Linux x64.

1. Bingo does not work properly if the schema name other than the default "bingo" is selected during install.
Steps to reproduce:
* During install, specify a non-default schema like so:
./bingo-pg-install.sh -pglibdir -schema someschema
* Observe that "someschema" with all the functions and config tables is properly created
* Create a table "someschema.molecules"
* Attempt to create a Bingo index on "someschema.molecules":

create index bin_index on someschema.molecules using bingo_idx (mol someschema.molecule);

* Observe unexpected output:
ERROR: error: bingo cursor access: internal error: can not prepare or open a cursor: relation "bingo.bingo_config" does not exist SQL state: XX000

2. Bingo won't create an index on a table located in another schema in the same database.

*Assume Bingo is installed in the default schema, "bingo"
*Assume the target table is "someshema.compounds"
* The following statement:

create index bin_index on someschema.compounds using bingo_idx (mol bingo.molecule);

Produces the following error message:

ERROR: error: bingo cursor access: internal error: can not prepare or open a cursor: permission denied for schema bingo SQL state: XX000

However, if I copy the table "compounds" verbatim into schema "bingo", the index is produced as expected without any issues.

The permission error clearly does not have anything to do with actual permissions, as all the queries are run as postgres. I have verified that the account has full access to every object in the database.

It looks like the default schema name is either hardcoded somewhere, or is not properly picked up by the cartridge code.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.