Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 2.23 KB

CONTRIBUTING.md

File metadata and controls

55 lines (37 loc) · 2.23 KB

Thanks for considering contributing! The information below is intended to help you contribute.

Running tests

# run all regression tests
make test

# only run regression tests that have $FILTER in regression sql file path
make test FILTER=hnsw

Running benchmarks

This requires Python to be installed. Please check the Dockerfile.dev for pip requirements.

# set up benchmarking, run benchmarks, and print results
make benchmark

# run benchmarks and print results (skip setup)
make benchmark-skip-setup

# print most recent benchmark results (skip setup and running benchmarks)
make benchmark-print-only

VSCode and IntelliSense

.vscode/c_cpp_properties is configured to use ./build/compile_commands.json. If you build Lantern in a different directory, make sure to update .vscode config appropriately in order to have IntelliSense working.

Debugging the C codebase

If you make changes to the C codebase, in addition to make test, you can also use the livedebug.py utility in a tmux session to easily attach gdb to the psql backend and find out what breaks. Below is a short recording demonstrating the use of livedebug.py:

asciicast

Adding/modifying LanternDB's SQL interface

When modifying the SQL interface, you add relevant SQL logic under sql/. In addition, you add an update script under sql/updates, in a file named [CURRENT_VERSION]--latest.sql. You should create this file if it does not exist.

Note that you never modify an already existing update file that does not have latest in its name.

The files that do not have latest in the name are part of a previous releases and help LanternDB users update to a newer version of the extension via ALTER EXTENSION lantern UPDATE.

Browsing the Postgres repository offline

You can download PostgreSQL source code from their ftp server. Alternatively, can clone their git repository.

# full repository
git clone https://git.postgresql.org/git/postgresql.git
# release head only
git clone --single-branch --branch REL_15_STABLE https://git.postgresql.org/git/postgresql.git --depth=1