Skip to content

Commit

Permalink
Merge pull request #106 from theseus-rs/update-docs
Browse files Browse the repository at this point in the history
docs: add version optimization documentation
  • Loading branch information
brianheineman committed Jul 8, 2024
2 parents 8b29f29 + 4aa0cd5 commit 3a92835
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions postgresql_embedded/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,20 @@ determined by the `POSTGRESQL_VERSION` environment variable. If the `POSTGRESQL_
environment variable is not set, then `postgresql_archive::LATEST` will be used to determine the
version of the PostgreSQL binaries to download.

When downloading the PostgreSQL binaries, either during build, or at runtime, the `GITHUB_TOKEN`
environment variable can be set to a GitHub personal access token to increase the rate limit for
downloading the PostgreSQL binaries. The `GITHUB_TOKEN` environment variable is not required.
When downloading the theseus PostgreSQL binaries, either during build, or at runtime, the
`GITHUB_TOKEN` environment variable can be set to a GitHub personal access token to increase
the rate limit for downloading the PostgreSQL binaries. The `GITHUB_TOKEN` environment
variable is not required.

At runtime, the PostgreSQL binaries are cached by default in the following directories:

- Unix: `$HOME/.theseus/postgresql`
- Windows: `%USERPROFILE%\.theseus\postgresql`

Performance can be improved by Using a specific version of the PostgreSQL binaries (e.g. `=16.3.0`).
After the first download, the PostgreSQL binaries will be cached and reused for subsequent runs.
Further, the repository will no longer be queried to calculate the version match.

## Feature flags

postgresql_embedded uses feature flags to address compile time and binary size
Expand Down
11 changes: 8 additions & 3 deletions postgresql_embedded/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,20 @@
//! environment variable is not set, then `postgresql_archive::LATEST` will be used to determine the
//! version of the PostgreSQL binaries to download.
//!
//! When downloading the PostgreSQL binaries, either during build, or at runtime, the `GITHUB_TOKEN`
//! environment variable can be set to a GitHub personal access token to increase the rate limit for
//! downloading the PostgreSQL binaries. The `GITHUB_TOKEN` environment variable is not required.
//! When downloading the theseus PostgreSQL binaries, either during build, or at runtime, the
//! `GITHUB_TOKEN` environment variable can be set to a GitHub personal access token to increase
//! the rate limit for downloading the PostgreSQL binaries. The `GITHUB_TOKEN` environment
//! variable is not required.
//!
//! At runtime, the PostgreSQL binaries are cached by default in the following directories:
//!
//! - Unix: `$HOME/.theseus/postgresql`
//! - Windows: `%USERPROFILE%\.theseus\postgresql`
//!
//! Performance can be improved by Using a specific version of the PostgreSQL binaries (e.g. `=16.3.0`).
//! After the first download, the PostgreSQL binaries will be cached and reused for subsequent runs.
//! Further, the repository will no longer be queried to calculate the version match.
//!
//! ## Feature flags
//!
//! postgresql_embedded uses feature flags to address compile time and binary size
Expand Down

0 comments on commit 3a92835

Please sign in to comment.