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

Add support and tests for install-time schema relocation #206

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

Ngalstyan4
Copy link
Contributor

Our extension cannot be fully relocatable since its objects span multiple schemas (we have _lantern_internal schema) It can be (and as of this commit) is install-time relocatable so it can be installed on a custom schema, different from the default one. See 38.17.2 in the link below for details
https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-RELOCATION

Note: access methods in postgres are not schema-qualified so they are always available globally, regardless of the schema on which the extension is installed
https://www.postgresql.org/docs/current/sql-create-access-method.html

@github-actions
Copy link

github-actions bot commented Oct 16, 2023

Benchmarks

metric old new pct change
recall (after create) 0.740 0.740 -
recall (after insert) 0.746 0.758 +1.61%
select bulk tps 485.043 480.111 -1.02%
select bulk latency (ms) 15.715 15.980 +1.69%
select bulk latency (stddev ms) 2.945 2.403 -18.40%
create latency (ms) 1219.584 1217.568 -0.17%
insert bulk tps 11.099 11.400 +2.71%
insert bulk latency (ms) 90.092 87.713 -2.64%
insert bulk latency (stddev ms) 1.482 3.544 +139.14%
disk usage (bytes) 6348800.000 6348800.000 -

@Ngalstyan4 Ngalstyan4 force-pushed the narek/ext-relocation branch from cf8322e to 57829fe Compare October 16, 2023 07:52
Our extension cannot be fully relocatable since its objects span
multiple schemas (we have _lantern_internal schema)
It can be (and as of this commit) is install-time relocatable
so it can be installed on a custom schema, different from the default
one. See 38.17.2 in the link below for details
https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-RELOCATION

Note: access methods in postgres are not schema-qualified so they are
always available globally, regardless of the schema on which the
extension is installed
https://www.postgresql.org/docs/current/sql-create-access-method.html
@Ngalstyan4 Ngalstyan4 force-pushed the narek/ext-relocation branch from 57829fe to 80d9eca Compare October 16, 2023 07:53
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #206 (1b70b5c) into main (3474f82) will increase coverage by 0.08%.
Report is 7 commits behind head on main.
The diff coverage is 85.71%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #206      +/-   ##
==========================================
+ Coverage   83.05%   83.14%   +0.08%     
==========================================
  Files          18       18              
  Lines        1216     1234      +18     
  Branches      261      264       +3     
==========================================
+ Hits         1010     1026      +16     
- Misses         81       83       +2     
  Partials      125      125              
Files Coverage Δ
src/hnsw/external_index.c 91.12% <100.00%> (+0.03%) ⬆️
src/hnsw/insert.c 82.53% <100.00%> (+0.28%) ⬆️
src/hnsw/scan.c 81.37% <100.00%> (+0.37%) ⬆️
src/hnsw/utils.h 40.00% <ø> (ø)
src/hnsw/utils.c 88.00% <90.90%> (+2.28%) ⬆️
src/hnsw/build.c 80.32% <60.00%> (-0.79%) ⬇️

... and 1 file with indirect coverage changes

@Ngalstyan4 Ngalstyan4 requested review from var77 and dqii October 16, 2023 08:03
@Ngalstyan4 Ngalstyan4 merged commit e68e849 into main Oct 16, 2023
@Ngalstyan4 Ngalstyan4 deleted the narek/ext-relocation branch October 16, 2023 17:23
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

Successfully merging this pull request may close these issues.

2 participants